configuration.nix/nixos/configs/default.nix

29 lines
1.4 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-04 20:07:52 +02:00
essential = with mods; [ grub base shell security wireless intranet ];
2024-08-03 10:49:41 +02:00
desktop = with mods; [ sound wayland ];
2024-08-04 14:10:03 +02:00
configWithModules = { hardware ? { nixpkgs.hostPlatform = system; }, 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-04 14:49:20 +02:00
nova = novaConfig [ mods.ivand ];
2024-08-04 15:11:01 +02:00
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-08-04 14:54:06 +02:00
install-iso = configWithModules { modules = (with mods; [ grub base shell wireless ]); };
2024-08-05 18:54:30 +02:00
vps = configWithModules { modules = (with mods; [ base shell security vps mailserver nginx wireguard-output anonymous-dns firewall ]); };
2024-08-04 20:07:52 +02:00
stara-miner = configWithModules { modules = (essential ++ [ mods.monero-miner ]); };
2024-07-04 08:38:33 +02:00
};
}