flake/hosts/dust/preservation.nix

51 lines
1 KiB
Nix
Raw Normal View History

{
2024-07-24 00:14:27 +08:00
fileSystems."/persist".neededForBoot = true;
2024-09-07 14:49:47 +08:00
preservation.enable = true;
preservation.preserveAt."/persist" = {
2024-07-24 00:14:27 +08:00
directories = [
"/var/log"
"/var/lib"
"/etc/secureboot"
];
2024-09-07 14:49:47 +08:00
2024-07-24 00:14:27 +08:00
users.guanranwang = {
directories = [
"Documents"
"Downloads"
"Music"
"Pictures"
"Projects"
2024-07-24 00:14:27 +08:00
"Videos"
".ssh"
".mozilla/firefox"
".thunderbird"
".cache"
".local/share"
".local/state"
".config/gh"
".config/fcitx5"
".config/obs-studio"
];
2024-09-21 01:38:01 +08:00
files = [ ".config/sops/age/keys.txt" ];
2024-07-24 00:14:27 +08:00
};
};
2024-09-07 14:49:47 +08:00
systemd.tmpfiles.settings.preservation =
let
mkTmpfile = {
user = "guanranwang";
group = "users";
mode = "0755";
};
in
{
"/home/guanranwang/.config".d = mkTmpfile;
"/home/guanranwang/.mozilla".d = mkTmpfile;
"/home/guanranwang/.local/share".d = mkTmpfile;
"/home/guanranwang/.local/state".d = mkTmpfile;
};
2024-07-24 00:14:27 +08:00
}