From fd5acfbcf65d1237af500f52e8e73446b1b647cb Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Mon, 9 Mar 2026 21:31:17 +0100 Subject: [PATCH 1/6] ci: Use short commit hash in notifications --- .github/workflows/ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a6ed8a..b739108 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -145,30 +145,30 @@ jobs: - name: Notify success if: needs.await-deploy.result == 'success' env: - BODY: |- - Commit `${{ github.sha }}` deployed successfully. - > ${{ github.event.head_commit.message }} + SHA: ${{ github.sha }} + COMMIT_MSG: ${{ github.event.head_commit.message }} run: | + body=$(printf 'Commit `%s` deployed successfully.\n> %s' "${SHA::7}" "$COMMIT_MSG") curl -s \ -H "Title: CI: Deployment succeeded" \ -H "Priority: low" \ -H "Tags: white_check_mark" \ -H "Actions: view, Open workflow run, ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \ -H "Markdown: yes" \ - -d "$BODY" \ + -d "$body" \ https://ntfy.sh/splitleaf - name: Notify failure if: needs.await-deploy.result == 'failure' env: - BODY: |- - Commit `${{ github.sha }}` failed to deploy. - > ${{ github.event.head_commit.message }} + SHA: ${{ github.sha }} + COMMIT_MSG: ${{ github.event.head_commit.message }} run: | + body=$(printf 'Commit `%s` failed to deploy.\n> %s' "${SHA::7}" "$COMMIT_MSG") curl -s \ -H "Title: CI: Deployment failed" \ -H "Priority: default" \ -H "Tags: rotating_light" \ -H "Actions: view, Open workflow run, ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \ -H "Markdown: yes" \ - -d "$BODY" \ + -d "$body" \ https://ntfy.sh/splitleaf From 3abf299cd659606b1885072e47d2c4eac966c510 Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Mon, 9 Mar 2026 21:37:16 +0100 Subject: [PATCH 2/6] glance: Init module --- hosts/srv-core/configuration.nix | 5 +++++ modules/nixos/web-services/glance.nix | 30 +++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 modules/nixos/web-services/glance.nix diff --git a/hosts/srv-core/configuration.nix b/hosts/srv-core/configuration.nix index 962334b..80844ff 100644 --- a/hosts/srv-core/configuration.nix +++ b/hosts/srv-core/configuration.nix @@ -72,6 +72,11 @@ domain = "status.${config.custom.networking.overlay.domain}"; generateDefaultEndpoints = true; }; + + glance = { + enable = true; + domain = "home.${config.custom.networking.overlay.domain}"; + }; }; }; } diff --git a/modules/nixos/web-services/glance.nix b/modules/nixos/web-services/glance.nix new file mode 100644 index 0000000..2767d46 --- /dev/null +++ b/modules/nixos/web-services/glance.nix @@ -0,0 +1,30 @@ +{ config, lib, ... }: +let + cfg = config.custom.web-services.glance; +in +{ + options.custom.web-services.glance = { + enable = lib.mkEnableOption ""; + domain = lib.mkOption { + type = lib.types.nonEmptyStr; + default = ""; + }; + port = lib.mkOption { + type = lib.types.port; + default = 63958; + }; + }; + + config = lib.mkIf cfg.enable { + services.glance = { + enable = true; + settings = { + inherit (cfg) port; + + #pages + }; + }; + + custom.services.caddy.virtualHosts.${cfg.domain}.port = cfg.port; + }; +} From 81cb5c27236532759a79861b9d80e9797ea68bda Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Mon, 9 Mar 2026 21:53:25 +0100 Subject: [PATCH 3/6] glance: Add services --- modules/nixos/web-services/glance.nix | 34 +++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/modules/nixos/web-services/glance.nix b/modules/nixos/web-services/glance.nix index 2767d46..6102223 100644 --- a/modules/nixos/web-services/glance.nix +++ b/modules/nixos/web-services/glance.nix @@ -1,4 +1,9 @@ -{ config, lib, ... }: +{ + config, + lib, + allHosts, + ... +}: let cfg = config.custom.web-services.glance; in @@ -21,7 +26,32 @@ in settings = { inherit (cfg) port; - #pages + pages = lib.singleton { + name = "Services"; + columns = [ + { + size = "full"; + widgets = [ + { + type = "monitor"; + cache = "1m"; + title = "Services"; + sites = + allHosts + |> lib.attrValues ( + host: + host.config.custom.services.caddy.virtualHosts |> lib.attrValues |> lib.map (vHost: vHost.domain) + ) + |> lib.concatLists + |> lib.map (domain: { + title = domain; + url = domain; + }); + } + ]; + } + ]; + }; }; }; From cb0d7c716c47ef70cd2714d125624cf82a650504 Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Mon, 9 Mar 2026 21:55:59 +0100 Subject: [PATCH 4/6] glance: Fix syntax --- modules/nixos/web-services/glance.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/nixos/web-services/glance.nix b/modules/nixos/web-services/glance.nix index 6102223..3add716 100644 --- a/modules/nixos/web-services/glance.nix +++ b/modules/nixos/web-services/glance.nix @@ -38,7 +38,8 @@ in title = "Services"; sites = allHosts - |> lib.attrValues ( + |> lib.attrValues + |> lib.map ( host: host.config.custom.services.caddy.virtualHosts |> lib.attrValues |> lib.map (vHost: vHost.domain) ) From db4bd23286b73358ce5b32c3a9b523476a567990 Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Mon, 9 Mar 2026 22:00:59 +0100 Subject: [PATCH 5/6] glance: Fix port --- modules/nixos/web-services/glance.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nixos/web-services/glance.nix b/modules/nixos/web-services/glance.nix index 3add716..ffd4513 100644 --- a/modules/nixos/web-services/glance.nix +++ b/modules/nixos/web-services/glance.nix @@ -24,7 +24,7 @@ in services.glance = { enable = true; settings = { - inherit (cfg) port; + server.port = cfg.port; pages = lib.singleton { name = "Services"; From 2d9a779fb19b2b076a5c54024bf77ebce470d31c Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Mon, 9 Mar 2026 22:03:33 +0100 Subject: [PATCH 6/6] glance: Fix url --- modules/nixos/web-services/glance.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nixos/web-services/glance.nix b/modules/nixos/web-services/glance.nix index ffd4513..22c4328 100644 --- a/modules/nixos/web-services/glance.nix +++ b/modules/nixos/web-services/glance.nix @@ -46,7 +46,7 @@ in |> lib.concatLists |> lib.map (domain: { title = domain; - url = domain; + url = "https://${domain}"; }); } ];