diff --git a/cluster/services/acme-client/default.nix b/cluster/services/acme-client/default.nix index 5a0e0cd..5645123 100644 --- a/cluster/services/acme-client/default.nix +++ b/cluster/services/acme-client/default.nix @@ -1,6 +1,6 @@ { services.acme-client = { - nodes.client = [ "VEGAS" "prophet" ]; + nodes.client = [ "checkmate" "VEGAS" "prophet" ]; nixos.client = ./client.nix; }; } diff --git a/cluster/services/dns/pdns-api-key.age b/cluster/services/dns/pdns-api-key.age index 3e90f17..65abafe 100644 --- a/cluster/services/dns/pdns-api-key.age +++ b/cluster/services/dns/pdns-api-key.age @@ -1,14 +1,16 @@ age-encryption.org/v1 --> ssh-ed25519 NO562A 1bb8hrQQunFIVGRUkg9QrAKof4tAAV8D1KRavicuaFY -y6X5aiD66+jBrfA9u3k3UrWQSEAd9yadLa0j2LgS9GY --> ssh-ed25519 5/zT0w Ke3Ymtxr2Kvp4piYChcTfBxNnBO4MlYPxVMNqC6z5X4 -CHzxDO2LIUHNjCr4O3hkA/9MSD6LXD3YUQVhtCKp3So --> ssh-ed25519 d3WGuA qPlzxEKYYe7QYBhsQuO/MI5IikwqjXVZutQL23aq2WQ -esQyjMbfaWYmtg9CAcHY/WJnsPZiZPITufIQ5TkGzEc --> ssh-ed25519 6YMlxg YajTOEPRSF/oMzlU4D0DC7DiBL22OxLBNTUN77wMwRY -RNZFOE7KV6UffoFUTcdnfrgz6wptvkvkZfR7H3GKs0g --> hI!f;r}-grease |@) -PVxV1yo85W0ceDE3nuYqdfYoRIQkwyp1VK1WIkxQjBMIs5kIx0Fw+WjdHT6wv/HH -Xh+qLqlgBfehoy28KZ52gsNRlDHN ---- +rOxrlTfSf4+mvHe8WZB1+xT0Jo/YxzEbEbIyOpLOS0 -4 . ߄pZO)B~acTv{_Uց8=UP0a"ATVr1nN{ 7HduHge{{0dMXy^4RWomz-)J9!7.oу9e+a&+]z}κ4R皂)Պ[4A O3D/X@7TRҵ6]/ ߽$_HjwK(ᓦ9np;Hhb2Yw;W 0I6 \ No newline at end of file +-> ssh-ed25519 NO562A L8hpKYttTvdcgFE0dutUUaUE8PFJ6vL1pUtf9qyrG3s +pWu4g9K6JIIRqstPodUEKrAKtPFJ6zanBK6N64jMw18 +-> ssh-ed25519 5/zT0w m1YXyS/RJEtc79mY39jfierPxzP/Tj11VfJA2VjFtB8 +5VeWMX7EQ3d+z4M8Nc2uRbrhr37KbSJsKOSAAIsyVqk +-> ssh-ed25519 TCgorQ ITq5QOMfdpJNpXv7EH3FXaZvUyfCMbeEfAZwq27YAl4 +fHVxtu2wwQDylXFFUgmEwIoTGrltKeSqgYvVdIl/UVs +-> ssh-ed25519 d3WGuA 9NGFoevYhPhU6tu88PplKtBrw/wP6ESfhAmRe9nV01s +dBqxeoIv1KGANbooK1s0Lr6c7khJN1nnfua6rFyV78E +-> ssh-ed25519 6YMlxg oPkKqmsaV95qpewGlWcoaXqTJt2feAmH6TL3CqzymxI +NMC1SRCdbGtrd+jsCZTz8Dwaf4TFT/JoV8Twih2iDMw +-> =|z4N-grease +03zbvyP3U5X8meDamKgLoK8UQe4nFi8e4ycdkPyacFTHk9vp+y4cI2vnEtAz +--- xEJd9gIQxtWG43mtFiuhZWPb7ajMIYNeA/8MMuFpe2s + uu'Tv< /_h Z'!@kL%# Ê֑@MFdo 9ه2/nV[}k#۩Nं>{Q4|v*ARnmi!q? H7(9j`^l6M->q[_ +_G}3)6kq/p2b晤>w?>|Ωk]An뉎^W&cCURQLz =~Fo @(&Ӊa,QF }P \ No newline at end of file diff --git a/cluster/services/monitoring/default.nix b/cluster/services/monitoring/default.nix index 98e3188..0523889 100644 --- a/cluster/services/monitoring/default.nix +++ b/cluster/services/monitoring/default.nix @@ -9,7 +9,7 @@ }; services.monitoring = { nodes = { - client = [ "VEGAS" "prophet" ]; + client = [ "checkmate" "VEGAS" "prophet" ]; }; nixos = { client = ./client.nix; diff --git a/cluster/services/nginx/default.nix b/cluster/services/nginx/default.nix index fa27013..a27752b 100644 --- a/cluster/services/nginx/default.nix +++ b/cluster/services/nginx/default.nix @@ -1,6 +1,6 @@ { services.nginx = { - nodes.host = [ "VEGAS" "prophet" ]; + nodes.host = [ "checkmate" "VEGAS" "prophet" ]; nixos.host = [ ./nginx.nix ]; }; } diff --git a/cluster/services/patroni/default.nix b/cluster/services/patroni/default.nix index 367c2cc..a490000 100644 --- a/cluster/services/patroni/default.nix +++ b/cluster/services/patroni/default.nix @@ -18,7 +18,6 @@ in vars.patroni = { etcdNodes = lib.genAttrs cfg.nodes.etcd (name: config.links."patroni-etcd-node-peer-${name}"); etcdNodesClient = lib.genAttrs cfg.nodes.etcd (name: config.links."patroni-etcd-node-client-${name}"); - etcdExtraNodes = [ "fly=http://10.1.1.151:2380" ]; passwords = { PATRONI_REPLICATION_PASSWORD = ./passwords/replication.age; PATRONI_SUPERUSER_PASSWORD = ./passwords/superuser.age; @@ -35,7 +34,7 @@ in services.patroni = { nodes = { worker = [ "VEGAS" "prophet" ]; - etcd = [ "VEGAS" "prophet" ]; + etcd = [ "checkmate" "VEGAS" "prophet" ]; haproxy = [ "VEGAS" "prophet" ]; }; nixos = { diff --git a/cluster/services/patroni/etcd.nix b/cluster/services/patroni/etcd.nix index e26bc18..bb4b6fd 100644 --- a/cluster/services/patroni/etcd.nix +++ b/cluster/services/patroni/etcd.nix @@ -12,7 +12,7 @@ in services.etcd = { enable = true; dataDir = "/srv/storage/private/etcd"; - initialCluster = (map mkMember cluster.config.services.patroni.nodes.etcd) ++ vars.patroni.etcdExtraNodes; + initialCluster = map mkMember cluster.config.services.patroni.nodes.etcd; listenPeerUrls = lib.singleton vars.patroni.etcdNodes.${vars.hostName}.url; listenClientUrls = lib.singleton vars.patroni.etcdNodesClient.${vars.hostName}.url; }; @@ -20,6 +20,7 @@ in # run on any architecture environment.ETCD_UNSUPPORTED_ARCH = pkgs.go.GOARCH; serviceConfig = { + TimeoutStartSec = "900s"; RestartSec = "5s"; Restart = "on-failure"; }; diff --git a/cluster/services/websites/default.nix b/cluster/services/websites/default.nix index 85c6380..6d12a71 100644 --- a/cluster/services/websites/default.nix +++ b/cluster/services/websites/default.nix @@ -1,7 +1,7 @@ { services.websites = { nodes = { - host = [ "VEGAS" "prophet" ]; + host = [ "checkmate" "VEGAS" "prophet" ]; }; nixos = { host = ./host.nix; diff --git a/cluster/services/wireguard/default.nix b/cluster/services/wireguard/default.nix index cae81a8..50b6114 100644 --- a/cluster/services/wireguard/default.nix +++ b/cluster/services/wireguard/default.nix @@ -14,12 +14,23 @@ in { vars = { mesh = { + checkmate = config.links.mesh-node-checkmate.extra; VEGAS = config.links.mesh-node-VEGAS.extra; prophet = config.links.mesh-node-prophet.extra; }; inherit meshNet; }; links = { + mesh-node-checkmate = { + ipv4 = getExtAddr hosts.checkmate; + extra = { + meshIp = "10.1.1.32"; + inherit meshNet; + pubKey = "fZMB9CDCWyBxPnsugo3Uxm/TIDP3VX54uFoaoC0bP3U="; + privKeyFile = ./mesh-keys/checkmate.age; + extraRoutes = []; + }; + }; mesh-node-VEGAS = { ipv4 = getExtAddr hosts.VEGAS; extra = { @@ -43,7 +54,7 @@ in }; services.wireguard = { nodes = { - mesh = [ "VEGAS" "prophet" ]; + mesh = [ "checkmate" "VEGAS" "prophet" ]; }; nixos = { mesh = ./mesh.nix; diff --git a/cluster/services/wireguard/mesh-keys/checkmate.age b/cluster/services/wireguard/mesh-keys/checkmate.age new file mode 100644 index 0000000..0276227 --- /dev/null +++ b/cluster/services/wireguard/mesh-keys/checkmate.age @@ -0,0 +1,12 @@ +age-encryption.org/v1 +-> ssh-ed25519 NO562A rE85lK37XeM803mXkugmTjfAp3LNqKy2yuGGbY4IOAM +nDielwqyuaW72OKiUBgFPWK45aZhh768+MskQ5+vhUs +-> ssh-ed25519 5/zT0w QxXHVLpk2qeXjO8c3a0cQ1oKk3fUn9+yIoHAK1hLYgQ +d4s/F2ck8Z4AsCQReghxj+M0JjBYKoMpfU+K21AzwFg +-> ssh-ed25519 TCgorQ lqg5aPJuj5NPEAgAaw52lwpQ++eWPxO4BITdpLKoZFg +KS0kRB2K/+/+U2xfr2VE09XdjVvIflTweU93Vy7Okr8 +-> ?).-grease =%LA 5cVQvduw +gs9TPdbaRJVf50LDiUdlg7Vr4LUfg2Kj2bPAbN2f2z4LKDnSbWHkJ6B3EfOMDxTN +KmX8mGCi7QBGOfb1EY3h5cDgteBXiLN4aLh6kpCe0F3/DQ +--- vLjmBMfCrvOuF1ww5UcHQAmBUo0LgIuJKcNEDlOCZ3g +ߏ&d!qH