nixos/hosts/common/optional/persistence.nix

22 lines
474 B
Nix

{enable}:
{
fileSystems."/persist".neededForBoot = true;
environment.persistence."/persist" = {
inherit enable;
hideMounts = true;
directories = [
"/etc/nixos"
"/var/log"
"/var/lib/nixos"
"/var/lib/systemd/coredump"
"/etc/NetworkManager/system-connections"
"/var/lib/flatpak"
"/run/secrets-for-users"
];
files = [
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_ed25519_key.pub"
];
};
}