1
0

flake.nix: generate nixos systems with functions

This commit is contained in:
clerie 2022-12-31 23:28:10 +01:00
parent 1b0b4e2d95
commit 60c17708ac

149
flake.nix
View File

@ -11,134 +11,35 @@
}; };
system = "x86_64-linux"; system = "x86_64-linux";
in { in {
nixosConfigurations = { nixosConfigurations = let
aluminium = nixpkgs.lib.nixosSystem { generateNixosSystem = name: nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
./hosts/aluminium/configuration.nix (./hosts + "/${name}/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
]; ];
}; };
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 = { colmena = {