put user-level impermanence settings in users.nix

This commit is contained in:
andromeda
2025-12-31 14:04:44 +01:00
parent 51d9476042
commit 92c4e1f7cf
4 changed files with 33 additions and 37 deletions

View File

@@ -50,6 +50,7 @@
./machines/${machine.hostname}/configuration.nix
./users.nix
./secrets.nix
impermanence.nixosModules.impermanence
agenix.nixosModules.default
];
};
@@ -81,7 +82,6 @@
)
);
}
impermanence.nixosModules.impermanence
noshell.nixosModules.default
]);
in {

View File

@@ -21,16 +21,6 @@
"/etc/machine-id"
"/etc/ly/save.txt"
];
users."mtgmonkey" = {
directories = [
".local/share/zoxide"
".ssh"
];
files = [
".bash_history"
".brush_history"
];
};
};
i18n.defaultLocale = "de_DE.UTF-8";
networking = {

View File

@@ -15,31 +15,5 @@
"/etc/machine-id"
"/etc/ly/save.txt"
];
users."andromeda" = {
directories = [
".backups"
".local/share/Anki2"
".local/share/chat.fluffy.fluffychat"
".local/share/zoxide"
".ssh"
"conf"
"Downloads"
"pp"
];
files = [
".bash_history"
".brush_history"
];
};
users."mtgmonkey" = {
directories = [
".local/share/zoxide"
".ssh"
];
files = [
".bash_history"
".brush_history"
];
};
};
}

View File

@@ -36,4 +36,36 @@ in {
];
};
};
environment.persistence."/nix/persist".users = lib.mkIf config.environment.persistence."/nix/persist".enable (
builtins.mapAttrs
(name: value: lib.mkIf (builtins.elem name machine.users) value)
{
"andromeda" = {
directories = [
".backups"
".local/share/Anki2"
".local/share/chat.fluffy.fluffychat"
".local/share.zoxide"
".ssh"
"conf"
"Downloads"
"pp"
];
files = [
".bash_history"
".brush_history"
];
};
"mtgmonkey" = {
directories = [
".local/share/zoxide"
".ssh"
];
files = [
".bash_history"
".brush_history"
];
};
}
);
}