flake.nix: Support different system types
This commit is contained in:
parent
4b8a678873
commit
4ab025cdad
55
flake.nix
55
flake.nix
@ -14,36 +14,35 @@
|
||||
outputs = { self, nixpkgs, nixos-exporter, solid-xmpp-alarm, ... }@inputs: let
|
||||
helper = (import ./lib/flake-helper.nix) inputs;
|
||||
in {
|
||||
nixosConfigurations = let
|
||||
inherit (helper)
|
||||
generateNixosSystem;
|
||||
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";
|
||||
dn42-ildix-service = generateNixosSystem "dn42-ildix-service";
|
||||
astatine = generateNixosSystem "astatine";
|
||||
_iso = generateNixosSystem "_iso";
|
||||
clerie.hosts = {
|
||||
aluminium = { name = "aluminium"; };
|
||||
backup-4 = { name = "backup-4"; };
|
||||
beryllium = { name = "beryllium"; };
|
||||
carbon = { name = "carbon"; };
|
||||
clerie-backup = { name = "clerie-backup"; };
|
||||
dn42-il-gw1 = { name = "dn42-il-gw1"; };
|
||||
dn42-il-gw5 = { name = "dn42-il-gw5"; };
|
||||
dn42-il-gw6 = { name = "dn42-il-gw6"; };
|
||||
dn42-ildix-clerie = { name = "dn42-ildix-clerie"; };
|
||||
gatekeeper = { name = "gatekeeper"; };
|
||||
hydra-1 = { name = "hydra-1"; };
|
||||
hydra-2 = { name = "hydra-2"; };
|
||||
minecraft-2 = { name = "minecraft-2"; };
|
||||
monitoring-3 = { name = "monitoring-3"; };
|
||||
nonat = { name = "nonat"; };
|
||||
osmium = { name = "osmium"; };
|
||||
palladium = { name = "palladium"; };
|
||||
porter = { name = "porter"; };
|
||||
schule = { name = "schule"; };
|
||||
storage-2 = { name = "storage-2"; };
|
||||
web-2 = { name = "web-2"; };
|
||||
dn42-ildix-service = { name = "dn42-ildix-service"; };
|
||||
astatine = { name = "astatine"; };
|
||||
_iso = { name = "_iso"; };
|
||||
};
|
||||
|
||||
nixosConfigurations = helper.mapToNixosConfigurations self.clerie.hosts;
|
||||
|
||||
colmena = {
|
||||
meta = {
|
||||
nixpkgs = import nixpkgs {};
|
||||
|
@ -1,10 +1,13 @@
|
||||
{ self, nixpkgs, nixos-exporter, solid-xmpp-alarm, ... }@inputs:
|
||||
|
||||
rec {
|
||||
generateNixosSystem = name: let
|
||||
generateNixosSystem = {
|
||||
name,
|
||||
system ? "x86_64-linux",
|
||||
}: let
|
||||
localNixpkgs = nixpkgs.lib.attrByPath [ "nixpkgs-${name}" ] nixpkgs inputs;
|
||||
in localNixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
system = system;
|
||||
modules = [
|
||||
({ ... }: {
|
||||
/*
|
||||
@ -28,6 +31,8 @@ rec {
|
||||
];
|
||||
};
|
||||
|
||||
mapToNixosConfigurations = hosts: builtins.mapAttrs (name: host: generateNixosSystem host) hosts;
|
||||
|
||||
generateColmenaHost = name: hostSystem: {
|
||||
deployment = {
|
||||
targetHost = "${name}.net.clerie.de";
|
||||
|
Loading…
Reference in New Issue
Block a user