dotfiles.nix/nixos/common/optional/persist.nix

34 lines
810 B
Nix
Raw Normal View History

2024-08-08 09:02:42 +08:00
{inputs, ...}: {
2024-01-21 21:03:57 +08:00
imports = [
inputs.impermanence.nixosModules.impermanence
];
2024-01-14 06:29:32 +08:00
# Files and directories we with to keep between reboots
environment.persistence."/persist" = {
hideMounts = true;
directories = [
"/var/log"
"/var/lib/bluetooth"
2024-04-01 10:00:56 +08:00
"/var/lib/docker"
2024-07-26 09:25:43 +08:00
"/var/lib/flatpak"
2024-01-14 06:29:32 +08:00
"/var/lib/nixos"
"/var/lib/systemd/coredump"
"/etc/NetworkManager/system-connections"
2024-12-21 21:55:23 +08:00
# Directories that require mode other than 0755
{
directory = "/var/lib/private";
mode = "0700";
}
2024-01-14 06:29:32 +08:00
];
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"
];
};
2024-01-21 21:03:57 +08:00
programs.fuse.userAllowOther = true;
2024-01-14 06:29:32 +08:00
}