configuration.nix/nixos/configs/default.nix

42 lines
1.4 KiB
Nix
Raw Normal View History

2024-08-07 18:44:14 +02:00
toplevel @ { inputs
, withSystem
, ...
}:
let
system = "x86_64-linux";
2024-08-02 19:47:54 +02:00
mods = toplevel.config.flake.nixosModules;
2024-08-07 20:38:52 +02:00
inherit (toplevel.config.flake) hardwareConfigurations;
2024-08-07 18:44:14 +02:00
essential = with mods; [ grub base shell security wireless intranet ];
desktop = with mods; [ sound wayland ];
configWithModules =
{ hardware ? { nixpkgs.hostPlatform = system; }
, modules
,
2024-08-07 17:41:33 +02:00
}:
2024-08-07 20:38:52 +02:00
withSystem system ({ inputs', pkgs, ... }:
2024-08-07 18:44:14 +02:00
inputs.nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs inputs' pkgs;
};
modules = [ hardware ] ++ modules;
});
2024-08-07 17:41:33 +02:00
novaConfig = mods:
configWithModules {
hardware = hardwareConfigurations.nova;
modules = essential ++ desktop ++ mods;
2024-08-02 19:47:54 +02:00
};
2024-08-07 18:44:14 +02:00
in
{
2024-07-04 08:38:33 +02:00
flake.nixosConfigurations = {
2024-08-07 18:44:14 +02:00
nova = novaConfig [ mods.ivand ];
nova-music = novaConfig (with mods; [ ivand music ]);
nova-crypto = novaConfig (with mods; [ ivand cryptocurrency ]);
nova-nonya = novaConfig (with mods; [ ivand anon cryptocurrency ]);
nova-ai = novaConfig (with mods; [ ivand ai ]);
2024-09-05 10:43:53 +02:00
nova-containers = novaConfig (with mods; [ ivand containers ]);
2024-08-07 18:44:14 +02:00
install-iso = configWithModules { modules = with mods; [ grub base shell wireless ]; };
vps = configWithModules { modules = with mods; [ base shell security vps mailserver nginx wireguard-output anonymous-dns firewall rest ]; };
stara-miner = configWithModules { modules = essential ++ [ mods.monero-miner ]; };
2024-07-04 08:38:33 +02:00
};
}