refactor: standardize hetzner machines

Signed-off-by: Lander Van den Bulcke <landervandenbulcke@gmail.com>
This commit is contained in:
Lander Van den Bulcke 2025-09-18 23:20:10 +02:00
parent 6289ac038f
commit beee7044fa
Signed by: lander
GPG key ID: 0142722B4B0C536F
3 changed files with 207 additions and 78 deletions

137
flake.nix
View file

@ -78,74 +78,77 @@
nixosModules = import ./modules/nixos;
homeManagerModules = import ./modules/home-manager;
nixosConfigurations = {
# Workstations
wodan = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs; };
modules = [
{
nixpkgs.overlays = [
tidalcycles.overlays.default
(_: prev: {
tailscale = prev.tailscale.overrideAttrs (old: {
checkFlags = builtins.map (
flag:
if prev.lib.hasPrefix "-skip=" flag then
flag + "|^TestGetList$|^TestIgnoreLocallyBoundPorts$|^TestPoller$"
else
flag
) old.checkFlags;
});
})
];
}
{ nixpkgs.overlays = [ tidalcycles.overlays.default ]; }
./hosts/wodan
];
};
widar = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs; };
modules = [
./hosts/widar
];
};
heimdall = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs outputs; };
modules = [
./hosts/heimdall
];
};
nixosConfigurations =
let
hetzner = import ./lib/hetzner.nix { inherit inputs nixpkgs; };
in
{
# Workstations
wodan = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs; };
modules = [
{
nixpkgs.overlays = [
tidalcycles.overlays.default
(_: prev: {
tailscale = prev.tailscale.overrideAttrs (old: {
checkFlags = builtins.map (
flag:
if prev.lib.hasPrefix "-skip=" flag then
flag + "|^TestGetList$|^TestIgnoreLocallyBoundPorts$|^TestPoller$"
else
flag
) old.checkFlags;
});
})
];
}
{ nixpkgs.overlays = [ tidalcycles.overlays.default ]; }
./hosts/wodan
];
};
widar = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs; };
modules = [
./hosts/widar
];
};
heimdall = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs outputs; };
modules = [
./hosts/heimdall
];
};
# servers
db-01 = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
specialArgs = { inherit inputs outputs; };
modules = [
./hosts/db-01
];
# servers
db-01 = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
specialArgs = { inherit inputs outputs; };
modules = [
./hosts/db-01
];
};
hosting-01 = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
specialArgs = { inherit inputs outputs; };
modules = [
./hosts/hosting-01
];
};
hosting-02 = hetzner.mkHetznerMachine "hosting-02" {
ipv6Address = "2a01:4f8:c013:7fc0::/64";
extraModules = [
./hosts/hosting-02
];
};
mail-01 = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
specialArgs = { inherit inputs outputs; };
modules = [
./hosts/mail-01
];
};
};
hosting-01 = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
specialArgs = { inherit inputs outputs; };
modules = [
./hosts/hosting-01
];
};
hosting-02 = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
specialArgs = { inherit inputs outputs; };
modules = [
./hosts/hosting-02
];
};
mail-01 = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
specialArgs = { inherit inputs outputs; };
modules = [
./hosts/mail-01
];
};
};
};
}