nixos-configuration/modules/disko/impermanence-home.nix

32 lines
725 B
Nix
Executable file

{ extraDirectories
, extraFiles
, username ? throw "need to know the username"
, nixIndexEnabled ? false
, ...
}:
{
home.persistence."/persist/home/${username}" = {
directories = [
# "Downloads" # no.
"Documents"
"Music"
"Pictures"
"Videos"
".gnupg"
".ssh"
".local"
".cache/mesa_shader_cache"
".cache/mesa_shader_cache_db"
# TODO: Move this shit into work user
] ++ (if (extraDirectories == null) then [ ] else extraDirectories);
files = [
".gitconfig"
# ".zsh_history"
] ++ (if (extraFiles == null) then [ ] else extraFiles)
# ++ (if nixIndexEnabled then [ ".cache/nix-index" ] else [])
;
allowOther = true;
};
}