@cryptotaxi247 / infra / commits / 2b9503ef

go-neb: pass the macaroon via /run/keys

Graham Christensen committed Dec 20, 2021 at 15:31 UTC 2b9503ef2133d4e4cc92f021589a5fb0aeec22c9
1 file changed +10 -4
delft/eris/alertmanager-matrix-forwarder.nix
+10 -4
@@ -5,12 +5,16 @@
5 # user = config.systemd.services.go-neb.serviceConfig.User;
6 };
7
8 + systemd.services.go-neb.serviceConfig.SupplementaryGroups = [ "keys" ];
9 +
10 services.go-neb = {
11 enable = true;
12 baseUrl = "http://localhost";
13 + secretFile = "/run/keys/alertmanager-matrix-forwarder";
14 config = {
15 clients = [
13 - { UserId = "@bot:nixos.org";
16 + {
17 + UserId = "@bot:nixos.org";
18 AccessToken = "$CHANGEME";
19 HomeServerUrl = "https://nixos.ems.host";
20 Sync = true;
@@ -19,13 +23,15 @@
23 }
24 ];
25 services = [
22 - { ID = "alertmanager_service";
26 + {
27 + ID = "alertmanager_service";
28 Type = "alertmanager";
29 UserId = "@bot:nixos.org";
30 Config = {
26 - webhook_url = "http://localhost:5040/services/hooks/YWxlcnRtYW5hZ2VyX3NlcnZpY2U";
31 + webhook_url = "http://localhost:4050/services/hooks/YWxlcnRtYW5hZ2VyX3NlcnZpY2U";
32 rooms = {
28 - "!QLQqibtFaVtDgurUAE:nixos.org" = { #bots:nixos.org
33 + "!QLQqibtFaVtDgurUAE:nixos.org" = {
34 + #bots:nixos.org
35 text_template = ''
36 {{range .Alerts -}} [{{ .Status }}] {{index .Labels "alertname" }}: {{index .Annotations "description"}} {{ end -}}
37 '';