Merge pull request #66 from nrdxp/override-modules

Make modules overridable
This commit is contained in:
Timothy DeHerrera 2020-12-31 14:04:03 -07:00 committed by GitHub
commit 4f4cd72fdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 3 deletions

View File

@ -28,7 +28,11 @@
externModules = [ home.nixosModules.home-manager ];
pkgset =
let overlays = (attrValues self.overlays) ++ externOverlays; in
let overlays =
(attrValues self.overlays)
++ externOverlays
++ [ self.overlay ];
in
genPkgset {
inherit master nixos overlays system;
};

View File

@ -14,14 +14,28 @@ let
inherit (builtins) attrValues removeAttrs;
inherit (pkgset) osPkgs unstablePkgs;
unstableModules = [ ];
config = hostName:
lib.nixosSystem {
inherit system;
specialArgs =
{
unstableModulesPath = "${master}/nixos/modules";
};
modules =
let
core = self.nixosModules.profiles.core;
modOverrides = { config, unstableModulesPath, ... }: {
disabledModules = unstableModules;
imports = map
(path: "${unstableModulesPath}/${path}")
unstableModules;
};
global = {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;

View File

@ -1,10 +1,10 @@
{ modulesPath, ... }: {
{ unstableModulesPath, ... }: {
imports = [
# passwd is nixos by default
../users/nixos
# passwd is empty by default
../users/root
"${modulesPath}/installer/cd-dvd/iso-image.nix"
"${unstableModulesPath}/installer/cd-dvd/iso-image.nix"
];
isoImage.makeEfiBootable = true;