high availability caddy

this was a fucking nightmare.
setting up the s3 storage plugin was painful, since caddy plugins are not nicely supported by the nix build yet.
rip.
oh well, i got it working.

and it WORKS
This commit is contained in:
nora 2024-08-06 22:12:16 +02:00
parent 9ce4ff862f
commit 5b2ca88597
19 changed files with 209 additions and 48 deletions

View file

@ -12,10 +12,15 @@ let
vps2 = {
A = [ "184.174.32.252" ];
};
combine = hosts: {
A = lib.lists.flatten (map (host: if builtins.hasAttr "A" host then host.A else [ ]) hosts);
AAAA = lib.lists.flatten (map (host: if builtins.hasAttr "AAAA" host then host.AAAA else [ ]) hosts);
};
in
with hostsToDns;
# vps1 contains root noratrieb.dev
vps1 // {
# vps{1,3,4} contains root noratrieb.dev
combine [ vps1 vps3 vps4 ] // {
SOA = {
nameServer = "ns1.noratrieb.dev.";
adminEmail = "void@noratrieb.dev";