mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-23 14:38:26 +01:00
Compare commits
No commits in common. "2d9a779fb19b2b076a5c54024bf77ebce470d31c" and "0b09699cc5f2e4f66d04520084b0e153c46010dd" have entirely different histories.
2d9a779fb1
...
0b09699cc5
3 changed files with 8 additions and 74 deletions
16
.github/workflows/ci.yml
vendored
16
.github/workflows/ci.yml
vendored
|
|
@ -145,30 +145,30 @@ jobs:
|
||||||
- name: Notify success
|
- name: Notify success
|
||||||
if: needs.await-deploy.result == 'success'
|
if: needs.await-deploy.result == 'success'
|
||||||
env:
|
env:
|
||||||
SHA: ${{ github.sha }}
|
BODY: |-
|
||||||
COMMIT_MSG: ${{ github.event.head_commit.message }}
|
Commit `${{ github.sha }}` deployed successfully.
|
||||||
|
> ${{ github.event.head_commit.message }}
|
||||||
run: |
|
run: |
|
||||||
body=$(printf 'Commit `%s` deployed successfully.\n> %s' "${SHA::7}" "$COMMIT_MSG")
|
|
||||||
curl -s \
|
curl -s \
|
||||||
-H "Title: CI: Deployment succeeded" \
|
-H "Title: CI: Deployment succeeded" \
|
||||||
-H "Priority: low" \
|
-H "Priority: low" \
|
||||||
-H "Tags: white_check_mark" \
|
-H "Tags: white_check_mark" \
|
||||||
-H "Actions: view, Open workflow run, ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
-H "Actions: view, Open workflow run, ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||||||
-H "Markdown: yes" \
|
-H "Markdown: yes" \
|
||||||
-d "$body" \
|
-d "$BODY" \
|
||||||
https://ntfy.sh/splitleaf
|
https://ntfy.sh/splitleaf
|
||||||
- name: Notify failure
|
- name: Notify failure
|
||||||
if: needs.await-deploy.result == 'failure'
|
if: needs.await-deploy.result == 'failure'
|
||||||
env:
|
env:
|
||||||
SHA: ${{ github.sha }}
|
BODY: |-
|
||||||
COMMIT_MSG: ${{ github.event.head_commit.message }}
|
Commit `${{ github.sha }}` failed to deploy.
|
||||||
|
> ${{ github.event.head_commit.message }}
|
||||||
run: |
|
run: |
|
||||||
body=$(printf 'Commit `%s` failed to deploy.\n> %s' "${SHA::7}" "$COMMIT_MSG")
|
|
||||||
curl -s \
|
curl -s \
|
||||||
-H "Title: CI: Deployment failed" \
|
-H "Title: CI: Deployment failed" \
|
||||||
-H "Priority: default" \
|
-H "Priority: default" \
|
||||||
-H "Tags: rotating_light" \
|
-H "Tags: rotating_light" \
|
||||||
-H "Actions: view, Open workflow run, ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
-H "Actions: view, Open workflow run, ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||||||
-H "Markdown: yes" \
|
-H "Markdown: yes" \
|
||||||
-d "$body" \
|
-d "$BODY" \
|
||||||
https://ntfy.sh/splitleaf
|
https://ntfy.sh/splitleaf
|
||||||
|
|
|
||||||
|
|
@ -72,11 +72,6 @@
|
||||||
domain = "status.${config.custom.networking.overlay.domain}";
|
domain = "status.${config.custom.networking.overlay.domain}";
|
||||||
generateDefaultEndpoints = true;
|
generateDefaultEndpoints = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
glance = {
|
|
||||||
enable = true;
|
|
||||||
domain = "home.${config.custom.networking.overlay.domain}";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue