home-manager/common: Use nixpkgs flake for pkgs in Nix registry
				
					
				
			This commit is contained in:
		@@ -1,4 +1,4 @@
 | 
			
		||||
{ lib, hmFlakes, inputs, pkgs', config, ... }:
 | 
			
		||||
{ lib, hmFlakes, pkgsFlakes, inputs, pkgs', config, ... }:
 | 
			
		||||
let
 | 
			
		||||
  inherit (builtins) head tail mapAttrs attrValues;
 | 
			
		||||
  inherit (lib) flatten optional optionalAttrs mkOption mkDefault mkOptionType mkIf;
 | 
			
		||||
@@ -24,7 +24,7 @@ let
 | 
			
		||||
    # config merging behaviour (or lack thereof; similar to NixOS module), we explicitly pass empty config.
 | 
			
		||||
    # TODO: Check if this is fixed in future.
 | 
			
		||||
    pkgs = pkgs'.${config'.nixpkgs}.${config'.system} // { config = { }; };
 | 
			
		||||
    extraSpecialArgs = { inherit inputs; };
 | 
			
		||||
    extraSpecialArgs = { inherit inputs pkgsFlakes; pkgsFlake = pkgsFlakes.${config'.nixpkgs}; };
 | 
			
		||||
    "${modArg}" = (attrValues cfg.modules) ++ [
 | 
			
		||||
      {
 | 
			
		||||
        warnings = flatten [
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
{ lib, pkgs, pkgs', inputs, config, ... }@args:
 | 
			
		||||
{ lib, pkgsFlake, pkgs, pkgs', inputs, config, ... }@args:
 | 
			
		||||
let
 | 
			
		||||
  inherit (builtins) listToAttrs mapAttrs readFile;
 | 
			
		||||
  inherit (lib)
 | 
			
		||||
@@ -223,7 +223,7 @@ in
 | 
			
		||||
          pkgs = {
 | 
			
		||||
            to = {
 | 
			
		||||
              type = "path";
 | 
			
		||||
              path = "${pkgs.path}";
 | 
			
		||||
              path = "${pkgsFlake}";
 | 
			
		||||
            };
 | 
			
		||||
            exact = true;
 | 
			
		||||
          };
 | 
			
		||||
 
 | 
			
		||||
@@ -31,7 +31,7 @@ let
 | 
			
		||||
      lib = pkgs.lib;
 | 
			
		||||
 | 
			
		||||
      # Put the inputs in specialArgs to avoid infinite recursion when modules try to do imports
 | 
			
		||||
      specialArgs = { inherit inputs allAssignments; inherit (cfg) systems; };
 | 
			
		||||
      specialArgs = { inherit inputs pkgsFlakes pkgsFlake allAssignments; inherit (cfg) systems; };
 | 
			
		||||
 | 
			
		||||
      # `baseModules` informs the manual which modules to document
 | 
			
		||||
      baseModules =
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user