flake.nix: generate nixos systems with functions
This commit is contained in:
parent
1b0b4e2d95
commit
60c17708ac
149
flake.nix
149
flake.nix
@ -11,134 +11,35 @@
|
||||
};
|
||||
system = "x86_64-linux";
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
aluminium = nixpkgs.lib.nixosSystem {
|
||||
nixosConfigurations = let
|
||||
generateNixosSystem = name: nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/aluminium/configuration.nix
|
||||
];
|
||||
};
|
||||
backup-4 = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/backup-4/configuration.nix
|
||||
];
|
||||
};
|
||||
beryllium = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/beryllium/configuration.nix
|
||||
];
|
||||
};
|
||||
carbon = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/carbon/configuration.nix
|
||||
];
|
||||
};
|
||||
clerie-backup = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/clerie-backup/configuration.nix
|
||||
];
|
||||
};
|
||||
dn42-il-gw1 = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/dn42-il-gw1/configuration.nix
|
||||
];
|
||||
};
|
||||
dn42-il-gw5 = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/dn42-il-gw5/configuration.nix
|
||||
];
|
||||
};
|
||||
dn42-il-gw6 = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/dn42-il-gw6/configuration.nix
|
||||
];
|
||||
};
|
||||
dn42-ildix-clerie = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/dn42-ildix-clerie/configuration.nix
|
||||
];
|
||||
};
|
||||
gatekeeper = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/gatekeeper/configuration.nix
|
||||
];
|
||||
};
|
||||
hydra-1 = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/hydra-1/configuration.nix
|
||||
];
|
||||
};
|
||||
hydra-2 = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/hydra-2/configuration.nix
|
||||
];
|
||||
};
|
||||
minecraft-2 = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/minecraft-2/configuration.nix
|
||||
];
|
||||
};
|
||||
monitoring-3 = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/monitoring-3/configuration.nix
|
||||
];
|
||||
};
|
||||
nonat = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/nonat/configuration.nix
|
||||
];
|
||||
};
|
||||
osmium = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/osmium/configuration.nix
|
||||
];
|
||||
};
|
||||
palladium = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/palladium/configuration.nix
|
||||
];
|
||||
};
|
||||
porter = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/porter/configuration.nix
|
||||
];
|
||||
};
|
||||
schule = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./configuration/common
|
||||
./hosts/schule/configuration.nix
|
||||
];
|
||||
};
|
||||
storage-2 = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/storage-2/configuration.nix
|
||||
];
|
||||
};
|
||||
web-2 = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/web-2/configuration.nix
|
||||
(./hosts + "/${name}/configuration.nix")
|
||||
];
|
||||
};
|
||||
in {
|
||||
aluminium = generateNixosSystem "aluminium";
|
||||
backup-4 = generateNixosSystem "backup-4";
|
||||
beryllium = generateNixosSystem "beryllium";
|
||||
carbon = generateNixosSystem "carbon";
|
||||
clerie-backup = generateNixosSystem "clerie-backup";
|
||||
dn42-il-gw1 = generateNixosSystem "dn42-il-gw1";
|
||||
dn42-il-gw5 = generateNixosSystem "dn42-il-gw5";
|
||||
dn42-il-gw6 = generateNixosSystem "dn42-il-gw6";
|
||||
dn42-ildix-clerie = generateNixosSystem "dn42-ildix-clerie";
|
||||
gatekeeper = generateNixosSystem "gatekeeper";
|
||||
hydra-1 = generateNixosSystem "hydra-1";
|
||||
hydra-2 = generateNixosSystem "hydra-2";
|
||||
minecraft-2 = generateNixosSystem "minecraft-2";
|
||||
monitoring-3 = generateNixosSystem "monitoring-3";
|
||||
nonat = generateNixosSystem "nonat";
|
||||
osmium = generateNixosSystem "osmium";
|
||||
palladium = generateNixosSystem "palladium";
|
||||
porter = generateNixosSystem "porter";
|
||||
schule = generateNixosSystem "schule";
|
||||
storage-2 = generateNixosSystem "storage-2";
|
||||
web-2 = generateNixosSystem "web-2";
|
||||
};
|
||||
|
||||
colmena = {
|
||||
|
Loading…
Reference in New Issue
Block a user