on-failure: on all machines now

This commit is contained in:
Ingolf Wagner 2020-03-17 15:00:57 +08:00
parent 05d0918083
commit b1d7d64030
Signed by: palo
GPG key ID: 76BF5F1928B9618B
5 changed files with 31 additions and 17 deletions

View file

@ -18,22 +18,6 @@
system.custom.wifi.interfaces = [ "wlp3s0" ];
on-failure = {
url = lib.fileContents <common_secrets/mattermost_sink_url>;
enable = true;
plans = {
tinc_private.name = "tinc.private";
tinc_retiolum.name = "tinc.retiolum";
sshd.name = "sshd";
tor.name = "tor";
dnsmasq.name = "dnsmasq";
backup_on_workhorse.name = "backup.on-workhorse.private";
backup_on_workout.name = "backup.on-workout.private";
backup_on_porani.name = "backup.on-porani.private";
syncthing.name = "syncthing";
};
};
security.wrappers = {
pmount.source = "${pkgs.pmount}/bin/pmount";
pumount.source = "${pkgs.pmount}/bin/pumount";

View file

@ -27,6 +27,18 @@
./mattermost.nix
];
# todo: add this to each file instead summing that here
on-failure.plans = {
gogs.name = "gogs";
jenkins.name = "jenkins";
graylog.name = "graylog";
prometheus.name = "prometheus";
taskserver.name = "taskserver";
weechat.name = "weechat";
transmission.name = "transmission";
mail-fetcher.name = "fetchmail";
};
networking.hostName = "workhorse";
# enable initrd ssh

View file

@ -51,7 +51,7 @@ let
--include \
--request POST \
--data-urlencode \
'payload={"text": "Service Failed ${plan.name} on ${config.networking.hostName}"}' \
'payload={"text": "<!channel> :fire: Service Failed ${plan.name} on ${config.networking.hostName}"}' \
${cfg.url}
'';

View file

@ -25,6 +25,7 @@
./sshd.nix
./syncthing.nix
./tinc.nix
./on-failure.nix
];

17
system/all/on-failure.nix Normal file
View file

@ -0,0 +1,17 @@
{ lib, ... }: {
on-failure = {
url = lib.fileContents <common_secrets/mattermost_sink_url>;
enable = true;
plans = {
tinc_private.name = "tinc.private";
tinc_retiolum.name = "tinc.retiolum";
sshd.name = "sshd";
tor.name = "tor";
dnsmasq.name = "dnsmasq";
backup_on_workhorse.name = "backup.on-workhorse.private";
backup_on_workout.name = "backup.on-workout.private";
backup_on_porani.name = "backup.on-porani.private";
syncthing.name = "syncthing";
};
};
}