2024-08-25 15:02:35 +00:00
|
|
|
{ lib, ... }:
|
|
|
|
{
|
|
|
|
sops.age.sshKeyPaths = lib.mkForce [ "/persist/etc/ssh/ssh_host_ed25519_key" ];
|
2024-07-23 16:14:27 +00:00
|
|
|
fileSystems."/persist".neededForBoot = true;
|
2024-09-07 06:49:47 +00:00
|
|
|
preservation.enable = true;
|
|
|
|
preservation.preserveAt."/persist" = {
|
2024-07-23 16:14:27 +00:00
|
|
|
directories = [
|
|
|
|
"/var/log"
|
|
|
|
"/var/lib"
|
|
|
|
"/etc/secureboot"
|
|
|
|
];
|
|
|
|
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"
|
|
|
|
];
|
2024-09-07 06:49:47 +00:00
|
|
|
|
2024-07-23 16:14:27 +00:00
|
|
|
users.guanranwang = {
|
|
|
|
directories = [
|
|
|
|
"Desktop"
|
|
|
|
"Documents"
|
|
|
|
"Downloads"
|
|
|
|
"Music"
|
|
|
|
"Pictures"
|
|
|
|
"Videos"
|
|
|
|
#"Public"
|
|
|
|
#"Templates"
|
|
|
|
|
|
|
|
".ssh"
|
|
|
|
".mozilla/firefox"
|
|
|
|
".thunderbird"
|
2024-10-26 02:27:20 +00:00
|
|
|
".minecraft"
|
|
|
|
".lunarclient"
|
2024-07-23 16:14:27 +00:00
|
|
|
|
|
|
|
".cache"
|
|
|
|
".local/share"
|
|
|
|
".local/state"
|
|
|
|
|
|
|
|
".config/gh"
|
|
|
|
".config/fcitx5"
|
|
|
|
".config/obs-studio"
|
|
|
|
];
|
2024-09-20 17:38:01 +00:00
|
|
|
files = [ ".config/sops/age/keys.txt" ];
|
2024-07-23 16:14:27 +00:00
|
|
|
};
|
|
|
|
};
|
2024-09-07 06:49:47 +00: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-23 16:14:27 +00:00
|
|
|
}
|