nix-config/hosts/hyp-01/modules/impermanence.nix
Lander Van den Bulcke a55ed8b41b
feat: add hyp-01
Signed-off-by: Lander Van den Bulcke <landervandenbulcke@gmail.com>
2025-11-01 18:23:04 +01:00

30 lines
570 B
Nix

{ lib, ... }:
{
boot.initrd.systemd.enable = true;
boot.initrd.postDeviceCommands = lib.mkAfter "zfs mount -a";
fileSystems."/" = {
device = "none";
fsType = "tmpfs";
options = [
"defaults"
"size=4G"
"mode=755"
];
};
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"
];
};
}