From 8327c991fc19f3ec9a94dc5307d7808b394653bb Mon Sep 17 00:00:00 2001 From: matt1432 Date: Sun, 19 Jan 2025 14:54:24 -0500 Subject: [PATCH] chore(pcsd): update to latest breaking changes --- configurations/cluster/default.nix | 2 +- .../cluster/modules/caddy/default.nix | 4 +- .../cluster/modules/headscale/default.nix | 2 +- .../cluster/modules/pcsd/default.nix | 43 +++++++++--------- .../cluster/modules/searxng/default.nix | 4 +- flake.lock | Bin 55613 -> 55665 bytes flake.nix | Bin 13006 -> 13064 bytes 7 files changed, 28 insertions(+), 27 deletions(-) diff --git a/configurations/cluster/default.nix b/configurations/cluster/default.nix index 8a7d4eaf..086da208 100644 --- a/configurations/cluster/default.nix +++ b/configurations/cluster/default.nix @@ -4,7 +4,7 @@ deviceName: { self, ... }: let - clusterIP = config.services.pcsd.virtualIps.caddy-vip.ip; + clusterIP = (builtins.head config.services.pcsd.virtualIps).ip; in { # ------------------------------------------------ # Imports diff --git a/configurations/cluster/modules/caddy/default.nix b/configurations/cluster/modules/caddy/default.nix index b7618109..19604be1 100644 --- a/configurations/cluster/modules/caddy/default.nix +++ b/configurations/cluster/modules/caddy/default.nix @@ -6,7 +6,7 @@ self, ... }: let - inherit (lib) attrValues removeAttrs; + inherit (lib) attrValues head removeAttrs; inherit (config.sops) secrets; inherit (config.networking) hostName; @@ -34,7 +34,7 @@ in { }; virtualHosts = let - clusterIP = config.services.pcsd.virtualIps.caddy-vip.ip; + clusterIP = (head config.services.pcsd.virtualIps).ip; nosIP = "10.0.0.121"; serviviIP = "10.0.0.249"; homieIP = "100.64.0.10"; diff --git a/configurations/cluster/modules/headscale/default.nix b/configurations/cluster/modules/headscale/default.nix index 72b76e95..079bee36 100644 --- a/configurations/cluster/modules/headscale/default.nix +++ b/configurations/cluster/modules/headscale/default.nix @@ -5,7 +5,7 @@ }: let inherit (config.networking) hostName; - clusterIP = config.services.pcsd.virtualIps.caddy-vip.ip; + clusterIP = (builtins.head config.services.pcsd.virtualIps).ip; in { users.users.${mainUser}.extraGroups = ["headscale"]; diff --git a/configurations/cluster/modules/pcsd/default.nix b/configurations/cluster/modules/pcsd/default.nix index 455f355b..dd262eaf 100644 --- a/configurations/cluster/modules/pcsd/default.nix +++ b/configurations/cluster/modules/pcsd/default.nix @@ -16,45 +16,46 @@ in { corosyncKeyFile = secrets.corosync.path; clusterUserPasswordFile = secrets.pcs-pass.path; - virtualIps = { - "caddy-vip" = { + virtualIps = [ + { + id = "caddy-vip"; ip = "10.0.0.130"; interface = "eno1"; group = "caddy-grp"; - }; - }; + } + ]; - systemdResources = { - "unbound" = { + systemdResources = [ + { + systemdName = "unbound"; enable = true; group = "caddy-grp"; - startAfter = ["caddy-vip"]; - }; + } - "blocky" = { + { + systemdName = "blocky"; enable = true; group = "caddy-grp"; - startAfter = ["unbound"]; - }; + } - "headscale" = { + { + systemdName = "headscale"; enable = true; group = "caddy-grp"; - startAfter = ["blocky"]; - }; + } - "caddy" = { + { + systemdName = "caddy"; enable = true; group = "caddy-grp"; - startAfter = ["headscale"]; - }; + } - "searx" = { + { + systemdName = "searx"; enable = true; group = "caddy-grp"; - startAfter = ["caddy"]; - }; - }; + } + ]; nodes = [ { diff --git a/configurations/cluster/modules/searxng/default.nix b/configurations/cluster/modules/searxng/default.nix index b62b87b9..9b9b6e4f 100644 --- a/configurations/cluster/modules/searxng/default.nix +++ b/configurations/cluster/modules/searxng/default.nix @@ -4,7 +4,7 @@ pkgs, ... }: let - inherit (lib) mapAttrsToList; + inherit (lib) head mapAttrsToList; in { services.searx = { enable = true; @@ -43,7 +43,7 @@ in { server = { port = 8080; - bind_address = config.services.pcsd.virtualIps.caddy-vip.ip; + bind_address = (head config.services.pcsd.virtualIps).ip; secret_key = "@SEARXNG_SECRET@"; diff --git a/flake.lock b/flake.lock index 3dbf03b7a4b4e74918b8ba90230dc29c2ae6d1d0..a630a3aefd7d85c9ed511bcd39bfc3d76823ce05 100644 GIT binary patch delta 144 zcmdnHiTUFu<_+94CKuFlPYy5@pR8c##b#`1Vq|VId7`AORz_HIib+avNUmFok-k|( zc5(Kx%+RiGj~#M{e=S9};9H=g$o2E?`4E6!(+nhi1oIL=kVK6fQ delta 137 zcmV;40CxZJvID)c1F#F2k&rhAG&wOaI5(4#U>+-YWjHH1XhAVVcVc-}Qfy^bH)~Z_ zQZ;05a%f{_a7J}AWocAbNP1;NY&4TlP&kwQm=`ECGh#6?F*!40Vr5}BFf=kUH8(go rH!)=~W@9)wVlp>5GBP&So#i diff --git a/flake.nix b/flake.nix index 79d5e92250ca7078e55e5058da58eb71ed4581a3..7a7e9a9f6e8e91206d5cdb8aace43fb923ddd9e1 100644 GIT binary patch delta 23 fcmX??+L5+lqw2%}-pTcxQIqFO$!z|mdW8o7e=!Or delta 20 ccmeB3JD0j)qv~V_ZQaT9rDQgns9oU!0AAz>C;$Ke