diff --git a/flake.nix b/flake.nix index 9c771916..a2f98932 100644 --- a/flake.nix +++ b/flake.nix @@ -330,6 +330,10 @@ homeConfigurations = lib'.mapAttrs (name: metadata: let + system = metadata.system or defaultSystem; + pkgs = import inputs."${metadata.nixpkgs-channel or "nixpkgs"}" { + inherit system overlays; + }; path = ./users/home-manager/${name}; extraModules = [ ({ pkgs, config, ... }: { @@ -349,8 +353,7 @@ ]; in mkUser { - inherit extraModules extraArgs; - system = metadata.system or defaultSystem; + inherit pkgs system extraModules extraArgs; home-manager-channel = metadata.home-manager-channel or "home-manager"; }) users; diff --git a/lib/images.nix b/lib/images.nix index 6f473f12..24895e3c 100644 --- a/lib/images.nix +++ b/lib/images.nix @@ -21,11 +21,11 @@ in }; # A wrapper around the home-manager configuration function. - mkUser = { system, extraModules ? [ ], extraArgs ? { }, home-manager-channel ? "home-manager" }: + mkUser = { system, extraModules ? [ ], extraArgs ? { }, home-manager-channel ? "home-manager", nixpkgs-channel ? "nixpkgs" }: inputs."${home-manager-channel}".lib.homeManagerConfiguration { inherit lib; extraSpecialArgs = extraArgs; - pkgs = import nixpkgs { inherit system; }; + pkgs = import inputs."${nixpkgs-channel}" { inherit system; }; modules = # Importing our custom home-manager modules. (import ../modules/home-manager { inherit lib; isInternal = true; })