2024-01-23 16:15:40 -05:00
|
|
|
{pkgs, ...}: {
|
2024-01-22 22:47:31 -05:00
|
|
|
imports = [
|
|
|
|
./options.nix
|
|
|
|
../corosync.nix
|
|
|
|
|
|
|
|
../caddy.nix
|
|
|
|
];
|
2024-01-22 21:22:48 -05:00
|
|
|
|
2024-01-22 21:46:59 -05:00
|
|
|
# TODO: update script
|
2024-01-23 16:15:40 -05:00
|
|
|
services = {
|
|
|
|
pacemaker = {
|
|
|
|
enable = true;
|
2024-01-22 21:22:48 -05:00
|
|
|
|
2024-01-23 16:15:40 -05:00
|
|
|
resources = {
|
|
|
|
"caddy" = {
|
|
|
|
enable = true;
|
|
|
|
virtualIps = [
|
|
|
|
{
|
|
|
|
id = "main";
|
|
|
|
interface = "eno1";
|
|
|
|
ip = "10.0.0.130";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2024-01-22 22:47:31 -05:00
|
|
|
};
|
|
|
|
};
|
2024-01-23 16:15:40 -05:00
|
|
|
|
|
|
|
rpcbind.enable = true; # needed for NFS
|
2024-01-22 21:22:48 -05:00
|
|
|
};
|
2024-01-23 16:15:40 -05:00
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [nfs-utils];
|
|
|
|
|
|
|
|
systemd.mounts = [
|
|
|
|
{
|
|
|
|
type = "nfs";
|
|
|
|
mountConfig = {
|
|
|
|
Options = "noatime";
|
|
|
|
};
|
|
|
|
what = "servivi:/caddy";
|
|
|
|
where = "/var/lib/caddy";
|
|
|
|
requiredBy = ["caddy.service"];
|
|
|
|
}
|
|
|
|
];
|
2024-01-22 21:22:48 -05:00
|
|
|
}
|