Skip to content

Commit

Permalink
Merge pull request #314 from barrucadu/yuggoth/persistboot
Browse files Browse the repository at this point in the history
[yuggoth] Fix /persist not being available for sops
  • Loading branch information
barrucadu authored Dec 10, 2024
2 parents a4256a5 + 07d91c8 commit 01050d3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
17 changes: 14 additions & 3 deletions docs/src/runbooks/set-up-a-new-host.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`:
Expand All @@ -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`
Expand Down
1 change: 1 addition & 0 deletions hosts/yuggoth/hardware.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
{
device = "local/persistent/persist";
fsType = "zfs";
neededForBoot = true;
};

fileSystems."/var/log" =
Expand Down

0 comments on commit 01050d3

Please sign in to comment.