lib/private: replace nixpkgs-channel to pkgs

The nixpkgs import should be easier to control from the flake
definition.
This commit is contained in:
Gabriel Arazas 2023-07-14 13:19:09 +08:00
parent 06704f5ab6
commit 92a2f81a2b
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
2 changed files with 7 additions and 4 deletions

View File

@ -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;

View File

@ -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; })