Personal home lab nixos setup exposed as a flake.
- Local Manual
man configuration.nix
- Remote Manual
- Wiki
- Package Search
- Options Search
- nixos/nixpkgs repo
- Home Assistant - Home automation
- Murmur - Mumble audio chat
- Frigate - Camera NVR
- Adguard Home - Network adblock
- immich - Family images
- wireguard - Family VPN
- syncthing - File sync for backup
- paperless-ngx - Document manager my printer is connected to
- go2rtc - Camera Streaming
- smokeping - service monitor
- nextcloud - Documents
- collabora - multi user document editing
- (new machine) boot nixos iso via PXE or usb
- (new machine) set password for nixos user
passwd
- (new machine) get ip
ip addr
- (new machine) check disk
lsblk
- (new machine) install keys
curl "https://github.com/jackinloadup.keys" > ~/.ssh/authorized_keys
- (new machine) get factor.json
sudo nix run --option experimental-features "nix-command flakes" nixpkgs#nixos-facter -- -o facter.json
- (existing machine) add disk encryption key into /tmp/disk.key
- (existing machine) nix run github:nix-community/nixos-anywhere -- --build-on local --flake ~/Projects/nixos-config/master#lyza -i ~/.ssh/id_rsa --disk-encryption-keys /tmp/disk.key /tmp/disk.key [email protected]
test with vm. Must comment out or disable all encryption due to vm-test not supporting disk key transfer
- (existing machine) nix run github:nix-community/nixos-anywhere -- --flake ~/Projects/nixos-config/master#lyza -i ~/.ssh/id_rsa --vm-test
If mounts didn't come up immediately, re apply tmpfiles
sudo systemctl restart systemd-tmpfiles-resetup.service
- boot nixos-install iso
- format disk using disko
- Prepare disk layout config
- Copy layout over:
scp ./profile/disks/disko-laptop-1.nix#TBD <target>:/tmp/disko-config.nix
- Find disk name:
sudo fdisk -l
- Place disk in device variable
vim /tmp/disk-config.nix
- Copy layout over:
- Create temp file with the password which will be applied to the disk
vim /tmp/disk.key
- Perform the format
sudo nix run github:nix-community/disko -- --mode disko /tmp/disko-config.nix
- Follow Complete the NixOS installation
- Before running
nixos-install
- Set networking.hostId
- Add the following config to enable ssh ``` services.openssh.enable = true; services.openssh.settings.PermitRootLogin = "yes";
- Prepare disk layout config
- reboot
- Apply machine config from local donor build machine
NIX_SSHOPTS="-t" nixos-rebuild boot --flake ~/Projects/nixos-config/master#zen --target-host root@zen