Hosts: fix mod override

In some occasions the module path was renamed.
To avoid conflicts, the old path must be disabled manually.

E.g.
```nix
{
  unstableModules = [
    "services/ttys/getty.nix"
  ];
  addToDisabledModules = [
    "services/ttys/agetty.nix"
  ];
}
```
This commit is contained in:
David Arnold 2021-01-11 17:27:38 -05:00 committed by GitHub
parent 70b26dd430
commit 17fb425844
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -15,6 +15,7 @@ let
inherit (pkgset) osPkgs unstablePkgs; inherit (pkgset) osPkgs unstablePkgs;
unstableModules = [ ]; unstableModules = [ ];
addToDisabledModules = [ ];
config = hostName: config = hostName:
lib.nixosSystem { lib.nixosSystem {
@ -30,7 +31,7 @@ let
core = self.nixosModules.profiles.core; core = self.nixosModules.profiles.core;
modOverrides = { config, unstableModulesPath, ... }: { modOverrides = { config, unstableModulesPath, ... }: {
disabledModules = unstableModules; disabledModules = unstableModules ++ addToDisabledModules;
imports = map imports = map
(path: "${unstableModulesPath}/${path}") (path: "${unstableModulesPath}/${path}")
unstableModules; unstableModules;