1
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

153
flake.nix
View File

@ -11,57 +11,126 @@
};
system = "x86_64-linux";
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 = {
meta = {
nixpkgs = import nixpkgs {};
};
defaults = { name, ... }: {
imports = [
(./. + "/hosts/${name}/configuration.nix")
];
deployment = {
targetHost = "${name}.net.clerie.de";
targetUser = null;
};
};
# Hosts
backup-4 = { ... }: {};
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 = { ... }: {};
};
} // builtins.mapAttrs (name: host: {
nixpkgs.system = host.config.nixpkgs.system;
imports = host._module.args.modules;
}) self.nixosConfigurations;
packages.x86_64-linux = {
inherit (pkgs)
@ -75,7 +144,9 @@
};
hydraJobs = {
inherit (self) packages;
inherit (self)
packages;
nixosConfigurations = builtins.mapAttrs (name: host: host.config.system.build.toplevel) self.nixosConfigurations;
};
};
}