No more defaultModules

This commit is contained in:
Artemis Tosini 2021-11-21 19:35:25 +00:00
parent edc21e7212
commit 45f38ee1a5
Signed by: artemist
GPG key ID: ADFFE553DCBB831E
2 changed files with 15 additions and 16 deletions

View file

@ -22,25 +22,24 @@
outputs = { self, nixpkgs, home-manager, rustybar, private, wip-pinebook-pro, ... } @ inputs: outputs = { self, nixpkgs, home-manager, rustybar, private, wip-pinebook-pro, ... } @ inputs:
let let
defaultModules = [ makeSystem = conf: nixpkgs.lib.nixosSystem (nixpkgs.lib.recursiveUpdate conf
private.nixosModules.base rec {
home-manager.nixosModules.home-manager
{
home-manager.extraSpecialArgs.inputs = inputs;
}
];
makeSystem = conf: nixpkgs.lib.nixosSystem (nixpkgs.lib.recursiveUpdate
{
specialArgs = { specialArgs = {
inherit inputs; inherit inputs;
}; };
modules = [
private.nixosModules.base
home-manager.nixosModules.home-manager
{
home-manager.extraSpecialArgs = specialArgs;
} }
conf); ] ++ (conf.modules or [ ]);
});
in in
{ {
nixosConfigurations.starlight = makeSystem { nixosConfigurations.starlight = makeSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = defaultModules ++ [ modules = [
./system/starlight ./system/starlight
private.nixosModules.starlight private.nixosModules.starlight
]; ];
@ -48,21 +47,21 @@
nixosConfigurations.rainbowdash = makeSystem { nixosConfigurations.rainbowdash = makeSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = defaultModules ++ [ modules = [
./system/rainbowdash ./system/rainbowdash
]; ];
}; };
nixosConfigurations.spike = makeSystem { nixosConfigurations.spike = makeSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = defaultModules ++ [ modules = [
./system/spike ./system/spike
]; ];
}; };
nixosConfigurations.mistmane = makeSystem { nixosConfigurations.mistmane = makeSystem {
system = "aarch64-linux"; system = "aarch64-linux";
modules = defaultModules ++ [ modules = [
./system/mistmane ./system/mistmane
]; ];
}; };