on-failure: on all machines now
This commit is contained in:
parent
05d0918083
commit
b1d7d64030
5 changed files with 31 additions and 17 deletions
|
@ -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";
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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}
|
||||
'';
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
./sshd.nix
|
||||
./syncthing.nix
|
||||
./tinc.nix
|
||||
./on-failure.nix
|
||||
|
||||
];
|
||||
|
||||
|
|
17
system/all/on-failure.nix
Normal file
17
system/all/on-failure.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue