From ac83b330a1482ff16f11b0f9fc5631f92d2a2a00 Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Tue, 17 Mar 2026 20:36:14 +0100 Subject: [PATCH 1/3] syncthing: Rename option `syncPort` to `port` --- modules/nixos/services/syncthing.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/nixos/services/syncthing.nix b/modules/nixos/services/syncthing.nix index 1505b3f..7c94f7d 100644 --- a/modules/nixos/services/syncthing.nix +++ b/modules/nixos/services/syncthing.nix @@ -20,7 +20,7 @@ in type = lib.types.nonEmptyStr; default = "${self}/hosts/${netCfg.hostName}/keys/syncthing.id" |> lib.readFile |> lib.trim; }; - syncPort = lib.mkOption { + port = lib.mkOption { type = lib.types.port; default = 22000; }; @@ -120,7 +120,7 @@ in |> lib.mapAttrs ( _: host: { id = host.config.custom.services.syncthing.deviceId; - addresses = lib.singleton "tcp://${host.config.custom.networking.overlay.address}:${toString host.config.custom.services.syncthing.syncPort}"; + addresses = lib.singleton "tcp://${host.config.custom.networking.overlay.address}:${toString host.config.custom.services.syncthing.port}"; } ); @@ -135,7 +135,7 @@ in }); options = { - listenAddress = "tcp://${netCfg.overlay.address}:${toString cfg.syncPort}"; + listenAddress = "tcp://${netCfg.overlay.address}:${toString cfg.port}"; globalAnnounceEnabled = false; localAnnounceEnabled = false; relaysEnabled = false; @@ -149,7 +149,7 @@ in }; nebula.networks.mesh.firewall.inbound = lib.singleton { - port = cfg.syncPort; + inherit (cfg) port; proto = "tcp"; group = "syncthing"; }; From 7bf505b3b543c17ac3e498f31141097d4f2fe8ec Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Tue, 17 Mar 2026 20:44:21 +0100 Subject: [PATCH 2/3] tests/syncthing: Fix option name --- tests/syncthing/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/syncthing/default.nix b/tests/syncthing/default.nix index f93224d..5a12767 100644 --- a/tests/syncthing/default.nix +++ b/tests/syncthing/default.nix @@ -65,7 +65,7 @@ client1NetCfg = nodes.client1.custom.networking.overlay; client2NetCfg = nodes.client2.custom.networking.overlay; - getSyncPort = hostName: nodes.${hostName}.custom.services.syncthing.syncPort |> toString; + getSyncPort = hostName: nodes.${hostName}.custom.services.syncthing.port |> toString; in '' start_all() From 2f11b4eec2b472ac8d4ba43f899980101434fc5f Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Tue, 17 Mar 2026 20:50:07 +0100 Subject: [PATCH 3/3] glance: Increase monitor timeout --- modules/nixos/web-services/glance.nix | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/nixos/web-services/glance.nix b/modules/nixos/web-services/glance.nix index 0cd3a12..6442030 100644 --- a/modules/nixos/web-services/glance.nix +++ b/modules/nixos/web-services/glance.nix @@ -8,9 +8,6 @@ let cfg = config.custom.web-services.glance; - perHostDomains = - perHostSitesWidget.widgets |> lib.concatMap (widget: widget.sites) |> lib.map (site: site.domain); - perHostSitesWidget = allHosts |> lib.attrValues @@ -21,7 +18,8 @@ let sites = host.config.custom.meta.sites |> lib.attrValues - |> lib.filter (site: site.domain |> lib.hasSuffix host.config.custom.networking.overlay.fqdn); + |> lib.filter (site: site.domain |> lib.hasSuffix host.config.custom.networking.overlay.fqdn) + |> lib.map (site: site // { timeout = "5s"; }); }) |> lib.filter ({ sites, ... }: sites != [ ]) |> (widgets: { @@ -30,21 +28,24 @@ let inherit widgets; }); + perHostDomains = + perHostSitesWidget.widgets |> lib.concatMap (widget: widget.sites) |> lib.map (site: site.domain); + applicationSitesWidget = allHosts |> lib.attrValues |> lib.concatMap (host: host.config.custom.meta.sites |> lib.attrValues) - |> lib.filter (service: !lib.elem service.domain perHostDomains) + |> lib.filter (site: !lib.elem site.domain perHostDomains) |> lib.groupBy ( - service: - service.domain |> self.lib.isPrivateDomain |> (isPrivate: if isPrivate then "Private" else "Public") + site: + site.domain |> self.lib.isPrivateDomain |> (isPrivate: if isPrivate then "Private" else "Public") ) |> lib.mapAttrsToList ( name: value: { type = "monitor"; cache = "1m"; title = "${name} Services"; - sites = value; + sites = value |> lib.map (site: site // { timeout = "5s"; }); } ) |> (widgets: {