diff --git a/home-manager/default.nix b/home-manager/default.nix index e517ee9ec..a58539617 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -8,24 +8,6 @@ let - homeManagerExpr = pkgs.writeText "home-manager.nix" '' - { pkgs ? import {}, confPath, confAttr }: - - let - env = import { - configuration = - let - conf = import confPath; - in - if confAttr == "" then conf else conf.''${confAttr}; - pkgs = pkgs; - }; - in - { - inherit (env) activationPackage; - } - ''; - modulesPathStr = if modulesPath == null then "" else modulesPath; in @@ -42,7 +24,7 @@ pkgs.stdenv.mkDerivation { --subst-var-by bash "${pkgs.bash}" \ --subst-var-by coreutils "${pkgs.coreutils}" \ --subst-var-by MODULES_PATH '${modulesPathStr}' \ - --subst-var-by HOME_MANAGER_EXPR_PATH "${homeManagerExpr}" + --subst-var-by HOME_MANAGER_EXPR_PATH "${./home-manager.nix}" ''; meta = with pkgs.stdenv.lib; { diff --git a/home-manager/home-manager.nix b/home-manager/home-manager.nix new file mode 100644 index 000000000..34ce49ace --- /dev/null +++ b/home-manager/home-manager.nix @@ -0,0 +1,15 @@ +{ pkgs ? import {}, confPath, confAttr }: + +let + env = import { + configuration = + let + conf = import confPath; + in + if confAttr == "" then conf else conf.''${confAttr}; + pkgs = pkgs; + }; +in + { + inherit (env) activationPackage; + }