nix-config/users/common/impermanence.nix
2023-10-10 18:37:55 +02:00

30 lines
636 B
Nix

{
config,
lib,
nixosConfig,
...
}: {
home.persistence."/state" = {
files = with lib.lists;
[
".ssh/known_hosts"
".cache/fuzzel"
]
++ optionals config.programs.rofi.enable [
".cache/rofi3.druncache"
];
directories = with lib.lists;
[".config/dconf"]
++ optionals config.programs.direnv.enable [
".local/share/direnv"
]
++ optionals config.programs.nushell.enable [
".config/nushell"
]
++ optionals nixosConfig.services.pipewire.enable [
# persist sound config
".local/state/wireplumber"
];
};
}