diff --git a/nix/modules/options/persist.nix b/nix/modules/options/persist.nix index 2ce1993..4e298c0 100644 --- a/nix/modules/options/persist.nix +++ b/nix/modules/options/persist.nix @@ -48,4 +48,16 @@ in }; }; }; + flake.modules.homeManager.default = + { config, ... }: + { + imports = [ inputs.impermanence.homeManagerModules.impermanence ]; + options.persistDirs = mkOpts "directory" { }; + options.persistFiles = mkOpts "file" { }; + config.home.persistence."/persist${config.home.homeDirectory}" = { + allowOther = true; + directories = config.persistDirs; + files = config.persistFiles; + }; + }; }