Skip to content

New Host Guide#

  1. Create the definition in the flake
  2. Load the minimal installer on the target
  3. (optional) enable ssh by setting a password
  4. format the disks using disko
    nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- -m destroy,format,mount -f <FLAKEREF>
    
  5. cd /mnt
  6. nixos-install --flake <FLAKEREF>
  7. ssh-keygen -f /mnt/etc/ssh/ssh_host_ed25519_key
  8. cat /mnt/etc/ssh/ssh_host_ed25519_key.pub | nix --experimental-features "nix-command flakes" run nixpkgs#ssh-to-age
  9. Add the age key to secrets.yaml using update-hosts
  10. Push the updated secrets
  11. nixos-install --flake <FLAKEREF> again
  12. reboot and pray