Hostname | Board | CPU | RAM | Primary GPU | Secondary GPU | Role | OS | State |
---|---|---|---|---|---|---|---|---|
ash |
[Raspberry pi 4] | [BCM2835 (4) @ 1.800GHz] | 8GB | 🖥️ | ❄️ | ✅ | ||
zima |
[Zimaboard 832] | [Intel Celeron N3450 (4) @ 2.200GHz ] | 8GB | [Intel HD Graphics 500] | 🖥️ | 🐧 | ✅ | |
vm1 |
📦 | ❄️ | ✅ | |||||
atlas |
📦 | ❄️ | ✅ |
Virtual machine: 📦 Linux: 🐧 NixOS: ❄️ Desktop: 🖥️ Laptop: 💻️
|-- home <-- home-manager configuration for each user
| `-- eragon <-- home-manager for user eragon
| |-- common <-- default configuration for cli
| |-- features
| | |-- cli <-- configuration for all cli related tools
| | |-- desktop <-- user configuration for desktop tools
| | | |-- common
| | | |-- gnome
| | | |-- sway
| | `-- nvim <-- configuration for nvim (from the repo kickstart.nvim)
| |-- ash.nix <-- home-manager for host ash
| |-- ssh.pub
| `-- vm1.nix <-- home-manager for host vm1
|
|-- hosts <-- all configuration on host level
| |-- common
| | |-- base <-- base configuration for all hosts
| | |-- disko <-- disko configs to set disk partitions on nix-anywhere install
| | |-- optional <-- optional configurations (like gnome, sddm, gdm, ...) on system level
| | `-- users <-- configuration for each user (to call home-manager)
| | `-- eragon
| |-- ash <-- configuration for the host ash
| | |-- default.nix
| | `-- hardware-configuration.nix
| |-- vm1 <-- configuration for the host vm1
|
|-- modules <-- modules for home-manager and nixos
| |-- home-manager
| `-- nixos
|
|-- overlays/ <-- Overlays to modify pkgs
|
|-- pkgs <-- Custom packages
| `-- wallpapers <-- Package for custom wallpapers
|
|-- default.nix <-- Nix dev file to be able to run the flake
|-- deploy.sh <-- Shell file to run the flake and update the system
|-- flake.lock <-- Version lock for the flake
|-- flake.nix <-- Nix file for the flake
`-- README.md <-- This README
/home/username
nix-store --gc
nix-store --gc --print-roots | egrep -v "^(/nix/var|/run/\w+-system|\{memory|/proc)"
sudo nix-collect-garbage --delete-older-than 20d
[!IMPORTANT] code below uses
vm1
as the example host
or get it from a vault (see nixos-anywhere vaults)
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C root@vm1
`"$temp/etc/ssh/ssh_host_ed25519_key"´
# Set the correct permissions so sshd will accept the key
chmod 600 "$temp/etc/ssh/ssh_host_ed25519_key"
nix run github:nix-community/nixos-anywhere -- --flake .#vm1 --vm-test
nix run github:nix-community/nixos-anywhere -- --extra-files "$temp" --flake .#vm1 nixos@ip
(without extra temp files)
nix run github:nix-community/nixos-anywhere -- --extra-files "$temp" --flake .#vm1 nixos@ip
As btrfs raid 10 is not supported from just disko run the following command after running btrfs
add disk /dev/sdd
to /data
btrfs device add /dev/sdd /data
and after you have added all the disks run
btrfs balance start -v -dconvert=raid10,soft /data
QEMU_NET_OPTS="hostfwd=tcp::2222-:22" nix --impure run github:nix-community/nixos-anywhere -- --flake .#vm1 --vm-test
ssh -p 2222 eragon@localhost
To create a password hash run the following command
mkpasswd -m sha-512
nix-shell https://github.com/jarneamerlinck/nix-config/tarball/main
mount -o degraded,usebackuproot /data
Snapper is used for snapshotting and recovery.
see snapper for more info.