diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b739108..0a6ed8a 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: - SHA: ${{ github.sha }} - COMMIT_MSG: ${{ github.event.head_commit.message }} + BODY: |- + Commit `${{ github.sha }}` deployed successfully. + > ${{ 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: - SHA: ${{ github.sha }} - COMMIT_MSG: ${{ github.event.head_commit.message }} + BODY: |- + Commit `${{ github.sha }}` failed to deploy. + > ${{ 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 diff --git a/hosts/srv-core/configuration.nix b/hosts/srv-core/configuration.nix index 80844ff..962334b 100644 --- a/hosts/srv-core/configuration.nix +++ b/hosts/srv-core/configuration.nix @@ -72,11 +72,6 @@ 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 deleted file mode 100644 index 22c4328..0000000 --- a/modules/nixos/web-services/glance.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ - config, - lib, - allHosts, - ... -}: -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 = { - server.port = cfg.port; - - pages = lib.singleton { - name = "Services"; - columns = [ - { - size = "full"; - widgets = [ - { - type = "monitor"; - cache = "1m"; - title = "Services"; - sites = - allHosts - |> lib.attrValues - |> lib.map ( - host: - host.config.custom.services.caddy.virtualHosts |> lib.attrValues |> lib.map (vHost: vHost.domain) - ) - |> lib.concatLists - |> lib.map (domain: { - title = domain; - url = "https://${domain}"; - }); - } - ]; - } - ]; - }; - }; - }; - - custom.services.caddy.virtualHosts.${cfg.domain}.port = cfg.port; - }; -}