Configuration for my network infrastructure.
Hostname | Device type | Operating system | Active |
---|---|---|---|
whitelodge |
VPS | NixOS | ❌ |
blacklodge |
Desktop computer | Pop!_OS | ✅ |
cooper |
Lenovo Thinkpad T14 Gen 2 | NixOS | ✅ |
gordon |
MacBook Air M3 | MacOS | ✅ |
bob |
Raspberry Pi 4 Model B | NixOS | ❌ |
hawk |
iPhone SE 2022 | iOS | ✅ |
audrey |
MikroTik hAP ac lite TC | OpenWRT | ❌ |
leland |
Synology NAS | Synology thingy | ✅ |
bobby |
Steam Deck | SteamOS | ✅ |
To define and deploy a machine (called twinpeaks
in this example), do the
following.
- Put its configuration under
machines/twinpeaks
. - Create an
outputs.nixosConfigurations.twinpeaks
block inflake.nix
. If necessary, define its network configuration inintranet/devices.nix
andintranet/wireguard.nix
. - Start the machine and its SSH server to generate an SSH host key.
- Obtain the host key.
$ ssh-keyscan <ip-address>
- Follow the instructions in the infra-secrets repository.
- SSH into the machine and enter a Nix shell with git (the flake setup needs
it).
$ nix shell nixpkgs#git
- Run
Explicitly setting the flake is only necessary during the initial deployment. Afterwards, the hostname will have been set and
# nixos-rebuild switch --flake 'github:tomaskala/infra#twinpeaks'
nixos-rebuild
will automatically select the matching flake.