Use this skill when adding a new machine/host to this repo.
Steps
- •Create
hosts/<hostname>/and add:- •
default.nixwith imports for./hardware-configuration.nix,./configuration.nix, and any host-only modules (copy a similar host as a template). - •
configuration.nixfor system settings, users, services, and michal modules. - •
hardware-configuration.nixgenerated on the target vianixos-generate-config(or copied from/etc/nixos/hardware-configuration.nix).
- •
- •Register the host in
hosts/default.nixunderhosts:- •
specialArgs = { username = "..."; hostname = "..."; inherit inputs self lib; }(match existing patterns). - •Add
system = "aarch64-linux";only if the host is non-x86 and not already set in hardware config.
- •
- •If the host needs deploy-rs, add a
deploy.nodes.<hostname>entry inflake.nixmirroring existing nodes. - •Ensure
system.stateVersionis set andnetworking.hostName = hostnameremains viahosts/common/default.nix.
Notes
- •Keep Nix files 2-space indented.
- •Prefer copying the closest existing host and adjust settings.