nix-config/hosts/hyp-01/modules/impermanence.nix
Lander Van den Bulcke c3e19aae29
fix: assertions
Signed-off-by: Lander Van den Bulcke <landervandenbulcke@gmail.com>
2025-11-04 10:54:43 +01:00

31 lines
555 B
Nix

{ lib, ... }:
{
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"
"/var/log"
];
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"
];
};
}