nix-config/hosts/hyp-01/modules/impermanence.nix
Lander Van den Bulcke 2e3fc206f4
fix: impermanence
Signed-off-by: Lander Van den Bulcke <landervandenbulcke@gmail.com>
2025-11-04 11:17:07 +01:00

32 lines
585 B
Nix

{
boot.initrd.systemd.enable = true;
fileSystems."/" = {
device = "none";
fsType = "tmpfs";
options = [
"defaults"
"size=4G"
"mode=755"
];
};
fileSystems."/persist".neededForBoot = true;
environment.persistence."/persist" = {
directories = [
"/etc/nixos"
"/etc/secrets"
"/var/log"
"/var/lib/nixos"
];
files = [
"/etc/machine-id"
"/etc/ssh/ssh_host_rsa_key"
"/etc/ssh/ssh_host_rsa_key.pub"
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_ed25519_key.pub"
];
};
}