builders: makePkgs

This commit is contained in:
Zynh Ludwig 2024-08-19 05:55:29 -07:00
parent 3872b51902
commit 11f9963090

View file

@ -3,6 +3,13 @@
let let
lib = nixpkgs.lib.extend (import ../lib); lib = nixpkgs.lib.extend (import ../lib);
makePkgs = system: (import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [ self.overlays.default ];
});
inherit (inputs.home-manager.lib) homeManagerConfiguration; inherit (inputs.home-manager.lib) homeManagerConfiguration;
inherit (nixpkgs.lib) nixosSystem; inherit (nixpkgs.lib) nixosSystem;
inherit (lib.strings) optionalString; inherit (lib.strings) optionalString;
@ -14,8 +21,9 @@ rec {
nameValuePair nameValuePair
hostname hostname
(nixosSystem { (nixosSystem {
inherit system; pkgs = makePkgs system;
specialArgs = { inherit inputs lib self; }; specialArgs = { inherit inputs lib self; };
modules = [ modules = [
../hosts/${hostname}/hardware-configuration.nix ../hosts/${hostname}/hardware-configuration.nix
../hosts/${hostname}/configuration.nix ../hosts/${hostname}/configuration.nix
@ -39,7 +47,7 @@ rec {
nameValuePair nameValuePair
"${user}${hostStr}" "${user}${hostStr}"
(homeManagerConfiguration { (homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.${system}; pkgs = makePkgs system;
extraSpecialArgs = { extraSpecialArgs = {
inherit inputs self; inherit inputs self;
lib = lib.extend (_: _: inputs.home-manager.lib); lib = lib.extend (_: _: inputs.home-manager.lib);