diff --git a/modules/home-environment.nix b/modules/home-environment.nix index d9816dea9..252e53e1b 100644 --- a/modules/home-environment.nix +++ b/modules/home-environment.nix @@ -383,6 +383,15 @@ in ''; }; + home.extraDependencies = mkOption { + type = types.listOf types.pathInStore; + default = [ ]; + description = '' + A list of paths that should be included in the home + closure but generally not visible. + ''; + }; + home.path = mkOption { internal = true; description = "The derivation installing the user packages."; @@ -780,6 +789,8 @@ in pkgs.runCommand "home-manager-generation" { preferLocalBuild = true; + passAsFile = [ "extraDependencies" ]; + inherit (config.home) extraDependencies; } '' mkdir -p $out @@ -797,6 +808,8 @@ in ln -s ${config.home-files} $out/home-files ln -s ${cfg.path} $out/home-path + cp "$extraDependenciesPath" "$out/extra-dependencies" + ${cfg.extraBuilderCommands} '';