Compare commits

...

2 Commits

2 changed files with 8 additions and 7 deletions

View File

@ -87,8 +87,9 @@
# This function produces a module that adds the home-manager module to the
# system and configures the given module to the user's Home Manager
# configuration
homeManagerInit = let _username=username;
homeManagerInit = let _username=username; _nixpkgs=nixpkgs;
in { system,
nixpkgs ? _nixpkgs, # this is so modules can know which flake the system is using
home-manager ? inputs.home-manager,
username ? _username,
module ? _ : {},
@ -118,7 +119,7 @@
useUserPackages = true;
inherit users;
extraSpecialArgs = {
inherit inputs outputs vars;
inherit inputs outputs vars nixpkgs;
extraPkgs = mkExtraPkgs system;
};
};
@ -156,13 +157,13 @@
})
./hosts/${hostname}/configuration.nix
(homeManagerInit {
inherit home-manager;
inherit nixpkgs home-manager;
module = import ./hosts/${hostname}/home.nix;
inherit username system stateVersion;
})
] ++ extraModules;
specialArgs = {
inherit inputs outputs vars;
inherit inputs outputs vars nixpkgs;
extraPkgs = mkExtraPkgs system;
};
};

View File

@ -1,4 +1,4 @@
{ pkgs, lib, config, options, inputs, ... }:
{ pkgs, lib, config, options, inputs, nixpkgs, ... }:
let
cfg = config.nixfiles.common.nix;
in
@ -39,7 +39,7 @@ in
type = "github";
owner = "NixOS";
repo = "nixpkgs";
rev = "${inputs.nixpkgs.rev}";
rev = "${nixpkgs.rev}";
};
};
};
@ -48,7 +48,7 @@ in
# compatibility becasue once `, vkcube` couldn't find the correct opengl
# driver or something (also it reduces the download size of temporary shell
# closures)
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ] ++ options.nix.nixPath.default;
nix.nixPath = [ "nixpkgs=${nixpkgs}" ] ++ options.nix.nixPath.default;
})
( lib.mkIf cfg.enable {