nix-config/users/common/impermanence.nix
2024-07-26 22:12:48 +02:00

27 lines
608 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"
];
};
}