refactor(nixosModules/hardware): move impermanence to btrfs module

This commit is contained in:
Mohammad Rafiq 2025-05-20 17:51:14 +08:00
parent 46f16c6889
commit 571801ad3b
No known key found for this signature in database
2 changed files with 15 additions and 13 deletions

View file

@ -83,6 +83,21 @@ in
umount /btrfs_tmp
'';
programs.fuse.userAllowOther = true;
fileSystems."/persist".neededForBoot = true;
environment.persistence."/persist" = {
hideMounts = true;
directories = [
"/var/lib/systemd"
"/var/lib/nixos"
];
files = [
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_ed25519_key.pub"
"/etc/ssh/ssh_host_rsa_key"
"/etc/ssh/ssh_host_rsa_key.pub"
"/etc/machine-id"
];
};
})
]
);

View file

@ -24,17 +24,4 @@
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
fileSystems."/persist".neededForBoot = true;
environment.persistence."/persist" = {
hideMounts = true;
directories = [ "/var/lib/systemd" ];
files = [
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_ed25519_key.pub"
"/etc/ssh/ssh_host_rsa_key"
"/etc/ssh/ssh_host_rsa_key.pub"
"/etc/machine-id"
];
};
}