2024-01-26 14:28:42 -05:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pacemaker,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit (config.sops) secrets;
|
|
|
|
in {
|
|
|
|
imports = [
|
|
|
|
pacemaker.nixosModules.default
|
|
|
|
|
|
|
|
./blocky.nix
|
|
|
|
./caddy.nix
|
|
|
|
./headscale
|
|
|
|
./nfs-client.nix
|
|
|
|
./unbound.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
services.pacemaker = {
|
|
|
|
enable = true;
|
|
|
|
clusterName = "thingies";
|
|
|
|
|
|
|
|
corosyncKeyFile = secrets.corosync.path;
|
|
|
|
clusterUserPasswordFile = secrets.PASSWORD.path;
|
|
|
|
|
|
|
|
virtualIps = {
|
|
|
|
"caddy-vip" = {
|
|
|
|
ip = "10.0.0.130";
|
|
|
|
interface = "eno1";
|
2024-01-26 20:43:09 -05:00
|
|
|
group = "caddy-grp";
|
2024-01-26 14:28:42 -05:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
systemdResources = {
|
|
|
|
"caddy" = {
|
|
|
|
enable = true;
|
2024-01-26 20:43:09 -05:00
|
|
|
group = "caddy-grp";
|
2024-01-26 14:28:42 -05:00
|
|
|
startAfter = ["caddy-vip"];
|
|
|
|
};
|
|
|
|
|
|
|
|
"unbound" = {
|
|
|
|
enable = true;
|
2024-01-26 20:43:09 -05:00
|
|
|
group = "caddy-grp";
|
2024-01-26 22:23:29 -05:00
|
|
|
startAfter = ["caddy-vip"];
|
2024-01-26 14:28:42 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
"blocky" = {
|
|
|
|
enable = true;
|
2024-01-26 20:43:09 -05:00
|
|
|
group = "caddy-grp";
|
2024-01-26 22:23:29 -05:00
|
|
|
startAfter = ["caddy-vip"];
|
2024-01-26 14:28:42 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
"headscale" = {
|
|
|
|
enable = true;
|
2024-01-26 20:43:09 -05:00
|
|
|
group = "caddy-grp";
|
2024-01-26 22:23:29 -05:00
|
|
|
startAfter = ["caddy-vip"];
|
2024-01-26 14:28:42 -05:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nodes = [
|
|
|
|
{
|
|
|
|
nodeid = 1;
|
|
|
|
name = "thingone";
|
|
|
|
ring_addrs = ["10.0.0.244"];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
nodeid = 2;
|
|
|
|
name = "thingtwo";
|
|
|
|
ring_addrs = ["10.0.0.159"];
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|