1
0
Fork 0

flake: restructure host defition and add hosts to hydra

This commit is contained in:
clerie 2022-10-03 15:26:15 +02:00
parent 2a2e7e0d96
commit b93e634a04
1 changed files with 112 additions and 41 deletions

153
flake.nix
View File

@ -11,57 +11,126 @@
}; };
system = "x86_64-linux"; system = "x86_64-linux";
in { in {
nixosConfigurations = {
backup-4 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/backup-4/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
];
};
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
];
};
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
];
};
};
colmena = { colmena = {
meta = { meta = {
nixpkgs = import nixpkgs {}; nixpkgs = import nixpkgs {};
}; };
defaults = { name, ... }: { defaults = { name, ... }: {
imports = [
(./. + "/hosts/${name}/configuration.nix")
];
deployment = { deployment = {
targetHost = "${name}.net.clerie.de"; targetHost = "${name}.net.clerie.de";
targetUser = null; targetUser = null;
}; };
}; };
} // builtins.mapAttrs (name: host: {
# Hosts nixpkgs.system = host.config.nixpkgs.system;
imports = host._module.args.modules;
backup-4 = { ... }: {}; }) self.nixosConfigurations;
carbon = { ... }: {};
clerie-backup = { ... }: {};
dn42-il-gw1 = { ... }: {};
dn42-il-gw5 = { ... }: {};
dn42-il-gw6 = { ... }: {};
dn42-ildix-clerie = { ... }: {};
gatekeeper = { ... }: {};
hydra-1 = { ... }: {};
minecraft-2 = { ... }: {};
monitoring-3 = { ... }: {};
nonat = { ... }: {};
osmium = { ... }: {};
palladium = { ... }: {};
porter = { ... }: {};
storage-2 = { ... }: {};
web-2 = { ... }: {};
};
packages.x86_64-linux = { packages.x86_64-linux = {
inherit (pkgs) inherit (pkgs)
@ -75,7 +144,9 @@
}; };
hydraJobs = { hydraJobs = {
inherit (self) packages; inherit (self)
packages;
nixosConfigurations = builtins.mapAttrs (name: host: host.config.system.build.toplevel) self.nixosConfigurations;
}; };
}; };
} }