configuration.nix/nixos/configs/default.nix

26 lines
1.0 KiB
Nix
Raw Normal View History

toplevel@{ inputs, withSystem, ... }:
let
system = "x86_64-linux";
2024-08-02 19:47:54 +02:00
mods = toplevel.config.flake.nixosModules;
2024-08-03 10:57:26 +02:00
hardwareConfigurations = toplevel.config.flake.hardwareConfigurations;
2024-08-03 15:41:51 +02:00
essential = with mods; [ grub base shell security wireless wireguard ];
2024-08-03 10:49:41 +02:00
desktop = with mods; [ sound wayland ];
configWithModules = { hardware, modules }: withSystem system (ctx@{ config, inputs', pkgs, ... }: inputs.nixpkgs.lib.nixosSystem {
2024-08-02 19:47:54 +02:00
specialArgs = {
inherit inputs inputs' pkgs;
packages = config.packages;
};
2024-08-03 10:49:41 +02:00
modules = [ hardware ] ++ modules;
2024-08-02 19:47:54 +02:00
});
2024-08-03 10:49:41 +02:00
novaConfig = mods: configWithModules { hardware = hardwareConfigurations.nova; modules = essential ++ desktop ++ mods; };
in
{
2024-07-04 08:38:33 +02:00
flake.nixosConfigurations = {
2024-08-03 10:49:41 +02:00
nixos = novaConfig [ mods.ivand ];
music = novaConfig (with mods; [ music ivand ]);
nonya = novaConfig (with mods; [ anon cryptocurrency ivand ]);
ai = novaConfig (with mods; [ ai ivand ]);
2024-08-03 15:14:13 +02:00
installer-iso = configWithModules { hardware = { }; modules = (with mods; [ grub base ]); };
2024-07-04 08:38:33 +02:00
};
}