nixos config refactor
This commit is contained in:
parent
fa2081dab1
commit
579259b156
@ -24,20 +24,22 @@ let
|
|||||||
hardware.cpu.intel.updateMicrocode = lib.mkForce false;
|
hardware.cpu.intel.updateMicrocode = lib.mkForce false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
essential = [ hardwareConfigurations.nova ] ++ (with mods; [ grub base sound wayland security ivand wireless wireguard ]);
|
essential = with mods; [ grub base security wireless wireguard ];
|
||||||
systemWithModules = modules: withSystem system (ctx@{ config, inputs', pkgs, ... }: inputs.nixpkgs.lib.nixosSystem {
|
desktop = with mods; [ sound wayland ];
|
||||||
|
configWithModules = { hardware, modules }: withSystem system (ctx@{ config, inputs', pkgs, ... }: inputs.nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs inputs' pkgs;
|
inherit inputs inputs' pkgs;
|
||||||
packages = config.packages;
|
packages = config.packages;
|
||||||
};
|
};
|
||||||
modules = modules;
|
modules = [ hardware ] ++ modules;
|
||||||
});
|
});
|
||||||
|
novaConfig = mods: configWithModules { hardware = hardwareConfigurations.nova; modules = essential ++ desktop ++ mods; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.nixosConfigurations = {
|
flake.nixosConfigurations = {
|
||||||
nixos = systemWithModules essential;
|
nixos = novaConfig [ mods.ivand ];
|
||||||
music = systemWithModules (essential ++ [ mods.music ]);
|
music = novaConfig (with mods; [ music ivand ]);
|
||||||
nonya = systemWithModules (essential ++ (with mods; [ anon cryptocurrency ]));
|
nonya = novaConfig (with mods; [ anon cryptocurrency ivand ]);
|
||||||
ai = systemWithModules (essential ++ (with mods; [ ai ]));
|
ai = novaConfig (with mods; [ ai ivand ]);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user