diff --git a/docs/src/runbooks/set-up-a-new-host.md b/docs/src/runbooks/set-up-a-new-host.md index ba5fab28..c268198e 100644 --- a/docs/src/runbooks/set-up-a-new-host.md +++ b/docs/src/runbooks/set-up-a-new-host.md @@ -56,9 +56,9 @@ nix run .#secrets Copy the host SSH keys to `/etc/persist`: ```bash -mkdir /persist/etc/ssh -cp /etc/ssh/ssh_host_rsa_key /persist/etc/ssh/ssh_host_rsa_key -cp /etc/ssh/ssh_host_ed25519_key /persist/etc/ssh/ssh_host_ed25519_key +sudo mkdir /persist/etc/ssh +sudo cp /etc/ssh/ssh_host_rsa_key /persist/etc/ssh/ssh_host_rsa_key +sudo cp /etc/ssh/ssh_host_ed25519_key /persist/etc/ssh/ssh_host_ed25519_key ``` Enable `nixfiles.eraseYourDarlings`: @@ -69,6 +69,17 @@ nixfiles.eraseYourDarlings.barrucaduPasswordFile = config.sops.secrets."users/ba sops.secrets."users/barrucadu".neededForUsers = true; ``` +Make the `/persist` volume available in early boot: + +```nix +fileSystems."/persist" = + { + device = "local/persistent/persist"; + fsType = "zfs"; + neededForBoot = true; + }; +``` + Then: 1. Rebuild the system: `sudo nixos-rebuild boot --flake /persist/etc/nixos` diff --git a/hosts/yuggoth/hardware.nix b/hosts/yuggoth/hardware.nix index c11f0124..cb0f20be 100644 --- a/hosts/yuggoth/hardware.nix +++ b/hosts/yuggoth/hardware.nix @@ -35,6 +35,7 @@ { device = "local/persistent/persist"; fsType = "zfs"; + neededForBoot = true; }; fileSystems."/var/log" =