These are NixOS specific modules. Including it sets up a main user and can include subsets of common things I use with a my.nixos.system.<module>.enable. Some modules are also configurable.
These are home-manager modules. Right now, each home module must be imported. But soon it will behave just like modules/nixos.
These are the files for each host. If the host runs on NixOS, then the default.nix file will configure the system. For home-manager files, those will be loaded by the home.nix file.
These are Nix overlays which can be loaded up and used.
In order to use the SOPS nix secrets, the key needs to be stored in ~/.config/sops/age/keys.txt. It can be extracted from 1Password.
mkdir -p ~/.config/sops/age
op read "op://NixOS/Sops Age Keys/keys.txt" -o ~/.config/sops/age/keys.txtHow to build the SD card:
nix build .#nixosConfigurations.raspberrypi.config.formats.sd-aarch64nix-shell -p zstdzstd -d $(readlink -f result) -c | sudo dd of=/dev/sdg bs=4096 conv=fsync status=progress
Where /dev/sdg is the location of the SD card. And the command above assumes Bash shell.
After the server starts, make sure change the password and to add a Samba user:
sudo smbpasswd -a piIt's also easy enough to build on a local machine the Pi dependencies and then copy those files over to the Pi for quick updates. The local machine will need boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; set up in order to be able to build for the ARM architecture.
nixos-rebuild --flake .#raspberrypi --target-host pi@raspberrypi.lan \
--use-remote-sudo switchIt's possible to use another machine to do building when trying to update the system.
sudo nixos-rebuild --build-host pope@soundwave.lan switch