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

@@ -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"
];
};
}
);
}