2024-01-26 14:28:42 -05:00
|
|
|
{
|
|
|
|
config,
|
2024-02-01 11:48:38 -05:00
|
|
|
pcsd,
|
2024-01-26 14:28:42 -05:00
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit (config.sops) secrets;
|
|
|
|
in {
|
|
|
|
imports = [
|
2024-02-01 11:48:38 -05:00
|
|
|
pcsd.nixosModules.default
|
2024-01-26 14:28:42 -05:00
|
|
|
|
|
|
|
./blocky.nix
|
|
|
|
./caddy.nix
|
|
|
|
./headscale
|
|
|
|
./nfs-client.nix
|
|
|
|
./unbound.nix
|
|
|
|
];
|
|
|
|
|
2024-02-01 11:48:38 -05:00
|
|
|
services.pcsd = {
|
2024-01-26 14:28:42 -05:00
|
|
|
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
|
|
|
|
2024-01-26 14:28:42 -05:00
|
|
|
clusterName = "thingies";
|
|
|
|
|
|
|
|
corosyncKeyFile = secrets.corosync.path;
|
2024-03-01 01:34:59 -05:00
|
|
|
clusterUserPasswordFile = secrets.pcs-pass.path;
|
2024-01-26 14:28:42 -05:00
|
|
|
|
|
|
|
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 = {
|
2024-02-12 11:32:49 -05:00
|
|
|
"unbound" = {
|
2024-01-26 14:28:42 -05:00
|
|
|
enable = true;
|
2024-01-26 20:43:09 -05:00
|
|
|
group = "caddy-grp";
|
2024-01-26 14:28:42 -05:00
|
|
|
startAfter = ["caddy-vip"];
|
|
|
|
};
|
|
|
|
|
2024-02-12 11:32:49 -05:00
|
|
|
"blocky" = {
|
2024-01-26 14:28:42 -05:00
|
|
|
enable = true;
|
2024-01-26 20:43:09 -05:00
|
|
|
group = "caddy-grp";
|
2024-02-12 11:32:49 -05:00
|
|
|
startAfter = ["unbound"];
|
2024-01-26 14:28:42 -05:00
|
|
|
};
|
|
|
|
|
2024-02-12 11:32:49 -05:00
|
|
|
"caddy" = {
|
2024-01-26 14:28:42 -05:00
|
|
|
enable = true;
|
2024-01-26 20:43:09 -05:00
|
|
|
group = "caddy-grp";
|
2024-02-12 11:32:49 -05:00
|
|
|
startAfter = ["blocky"];
|
2024-01-26 14:28:42 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
"headscale" = {
|
|
|
|
enable = true;
|
2024-01-26 20:43:09 -05:00
|
|
|
group = "caddy-grp";
|
2024-02-12 11:32:49 -05:00
|
|
|
startAfter = ["caddy"];
|
2024-01-26 14:28:42 -05:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nodes = [
|
|
|
|
{
|
|
|
|
name = "thingone";
|
2024-02-14 17:30:28 -05:00
|
|
|
nodeid = 1;
|
|
|
|
ring_addrs = ["10.0.0.244"];
|
2024-01-26 14:28:42 -05:00
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "thingtwo";
|
2024-02-14 17:30:28 -05:00
|
|
|
nodeid = 2;
|
|
|
|
ring_addrs = ["10.0.0.159"];
|
2024-01-26 14:28:42 -05:00
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|