aboutsummaryrefslogtreecommitdiff
path: root/hosts/enode/impermenance.nix
diff options
context:
space:
mode:
authorIsabella Bastaja <isabella@sorre.xyz>2026-10-26 22:05:45 +0100
committerIsabella Bastaja <isabella@sorre.xyz>2026-10-27 01:27:22 +0100
commit05ad01612f9c75cc3e38940e52524736af1ead9d (patch)
tree9aa4821a06fe276d2a0fad46f5e450c8ad4b6775 /hosts/enode/impermenance.nix
parent1c06f302d9fcdf8ff28b07778540bce7a7cc4c49 (diff)
enode: fix impermenance and disko config
- don't persist the whole of /var/lib - fix persistence path/mount - persist a few other misc. paths like host ssh keys
Diffstat (limited to 'hosts/enode/impermenance.nix')
-rw-r--r--hosts/enode/impermenance.nix11
1 files changed, 9 insertions, 2 deletions
diff --git a/hosts/enode/impermenance.nix b/hosts/enode/impermenance.nix
index 3401e8e..20df233 100644
--- a/hosts/enode/impermenance.nix
+++ b/hosts/enode/impermenance.nix
@@ -1,4 +1,8 @@
-{ utils, ... }: {
+{ config, utils, ... }:
+let
+ ssh-host-keys = map (k: k.path) (builtins.attrValues config.services.openssh.hostKeys);
+in
+{
# Use /var/lib/persist as the persistence root, matching Disko's mountpoint
environment.persistence."/var/lib/persist" = {
hideMounts = true;
@@ -6,6 +10,7 @@
"/var/lib/nixos"
"/var/lib/systemd/coredump"
"/var/lib/systemd/timers"
+ "/var/lib/systemd/linger"
"/var/lib/backups"
"/var/lib/headscale"
@@ -18,10 +23,12 @@
}
];
files = [
+ "/var/lib/systemd/random-seed"
"/etc/machine-id"
"/etc/shadow"
"/etc/passwd"
- ];
+ ]
+ ++ ssh-host-keys;
};
boot.initrd.systemd.services.wipe-root = {