A highly modular Nix flake that acts as the configuration for various systems I have about. Optimised to make adding modules trivial, no need to modify existing code to add new modules.
Clone Repository:
git clone https://github.com/kassieal/nixos-config && cd nixos-configFormat with Disko and Verify Partioning:
sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode disko hosts/<host-name>/disko.nix && lsblkGenerate the Hardware Configuration File:
sudo nixos-generate-config --no-filesystems --root /mnt/persistCopy Hardware Configuration into Repository:
sudo cp /mnt/persist/etc/nixos/hardware-configuration.nix hosts/<host-name>Copy Configuration to Filesystem:
cd ../ && sudo cp -r nixos-config /mnt/persist/etc/nixos/Change Directory to Repository:
cd /mnt/persist/etc/nixos/nixos-configInstall with Flake
sudo nixos-install --flake .#<host-name> --root /mnt