nixos-configs/devices/cluster/modules/pcsd.nix

68 lines
1.2 KiB
Nix
Raw Normal View History

{
config,
2024-02-01 11:48:38 -05:00
pcsd,
...
}: let
inherit (config.sops) secrets;
in {
imports = [pcsd.nixosModules.default];
2024-02-01 11:48:38 -05:00
services.pcsd = {
enable = true;
2024-02-19 08:36:49 -05:00
enableBinaryCache = true;
2024-03-10 20:04:04 -04:00
enableWebUI = true;
2024-02-19 08:36:49 -05:00
clusterName = "thingies";
corosyncKeyFile = secrets.corosync.path;
2024-03-01 01:34:59 -05:00
clusterUserPasswordFile = secrets.pcs-pass.path;
virtualIps = {
"caddy-vip" = {
ip = "10.0.0.130";
interface = "eno1";
group = "caddy-grp";
};
};
systemdResources = {
2024-02-12 11:32:49 -05:00
"unbound" = {
enable = true;
group = "caddy-grp";
startAfter = ["caddy-vip"];
};
2024-02-12 11:32:49 -05:00
"blocky" = {
enable = true;
group = "caddy-grp";
2024-02-12 11:32:49 -05:00
startAfter = ["unbound"];
};
2024-02-12 11:32:49 -05:00
"caddy" = {
enable = true;
group = "caddy-grp";
2024-02-12 11:32:49 -05:00
startAfter = ["blocky"];
};
"headscale" = {
enable = true;
group = "caddy-grp";
2024-02-12 11:32:49 -05:00
startAfter = ["caddy"];
};
};
nodes = [
{
name = "thingone";
2024-02-14 17:30:28 -05:00
nodeid = 1;
ring_addrs = ["10.0.0.244"];
}
{
name = "thingtwo";
2024-02-14 17:30:28 -05:00
nodeid = 2;
ring_addrs = ["10.0.0.159"];
}
];
};
}