Merge pull request #66 from nrdxp/override-modules
Make modules overridable
This commit is contained in:
commit
4f4cd72fdc
3 changed files with 21 additions and 3 deletions
|
@ -28,7 +28,11 @@
|
||||||
externModules = [ home.nixosModules.home-manager ];
|
externModules = [ home.nixosModules.home-manager ];
|
||||||
|
|
||||||
pkgset =
|
pkgset =
|
||||||
let overlays = (attrValues self.overlays) ++ externOverlays; in
|
let overlays =
|
||||||
|
(attrValues self.overlays)
|
||||||
|
++ externOverlays
|
||||||
|
++ [ self.overlay ];
|
||||||
|
in
|
||||||
genPkgset {
|
genPkgset {
|
||||||
inherit master nixos overlays system;
|
inherit master nixos overlays system;
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,14 +14,28 @@ let
|
||||||
inherit (builtins) attrValues removeAttrs;
|
inherit (builtins) attrValues removeAttrs;
|
||||||
inherit (pkgset) osPkgs unstablePkgs;
|
inherit (pkgset) osPkgs unstablePkgs;
|
||||||
|
|
||||||
|
unstableModules = [ ];
|
||||||
|
|
||||||
config = hostName:
|
config = hostName:
|
||||||
lib.nixosSystem {
|
lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
|
|
||||||
|
specialArgs =
|
||||||
|
{
|
||||||
|
unstableModulesPath = "${master}/nixos/modules";
|
||||||
|
};
|
||||||
|
|
||||||
modules =
|
modules =
|
||||||
let
|
let
|
||||||
core = self.nixosModules.profiles.core;
|
core = self.nixosModules.profiles.core;
|
||||||
|
|
||||||
|
modOverrides = { config, unstableModulesPath, ... }: {
|
||||||
|
disabledModules = unstableModules;
|
||||||
|
imports = map
|
||||||
|
(path: "${unstableModulesPath}/${path}")
|
||||||
|
unstableModules;
|
||||||
|
};
|
||||||
|
|
||||||
global = {
|
global = {
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{ modulesPath, ... }: {
|
{ unstableModulesPath, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
# passwd is nixos by default
|
# passwd is nixos by default
|
||||||
../users/nixos
|
../users/nixos
|
||||||
# passwd is empty by default
|
# passwd is empty by default
|
||||||
../users/root
|
../users/root
|
||||||
"${modulesPath}/installer/cd-dvd/iso-image.nix"
|
"${unstableModulesPath}/installer/cd-dvd/iso-image.nix"
|
||||||
];
|
];
|
||||||
|
|
||||||
isoImage.makeEfiBootable = true;
|
isoImage.makeEfiBootable = true;
|
||||||
|
|
Loading…
Reference in a new issue