nixos/hosts/common/optional/persistence.nix

22 lines
474 B
Nix
Raw Normal View History

2024-06-28 16:05:12 +01:00
{enable}:
2024-05-25 20:48:50 +01:00
{
fileSystems."/persist".neededForBoot = true;
environment.persistence."/persist" = {
2024-06-28 16:05:12 +01:00
inherit enable;
2024-05-25 20:48:50 +01:00
hideMounts = true;
directories = [
"/etc/nixos"
"/var/log"
"/var/lib/nixos"
"/var/lib/systemd/coredump"
"/etc/NetworkManager/system-connections"
2024-05-27 15:04:34 +01:00
"/var/lib/flatpak"
"/run/secrets-for-users"
2024-05-25 20:48:50 +01:00
];
files = [
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_ed25519_key.pub"
];
};
}