ctucx.git: nixfiles

ctucx' nixfiles

commit 949bbbeca5b916a436abdd0cf1e602d4cc16b000
parent bd29fbc8bc2274d2f7b669558516944031977bb7
Author: Leah (ctucx) <leah@ctu.cx>
Date: Tue, 13 Sep 2022 19:58:45 +0200

fixup: `notify-failure` service got renamed to `email-notify`
23 files changed, 24 insertions(+), 26 deletions(-)
diff --git a/machines/deprecated/taurus/configuration.nix b/machines/deprecated/taurus/configuration.nix
@@ -5,8 +5,6 @@
   imports = [
     ./hardware-configuration.nix
     ../../configurations/common.nix
-    ../../configurations/notify-failure.nix
-
 
     ../../configurations/services/prometheus-node-exporter.nix
     ../../configurations/services/bind.nix

@@ -20,7 +18,7 @@
   age.secrets.restic-server-desastro.file = ../../secrets/restic-server/desastro.age;
   age.secrets.restic-server-hector.file   = ../../secrets/restic-server/hector.age;
 
-  systemd.services.nginx.onFailure = [ "notify-failure@%i.service" ];
+  systemd.services.nginx.onFailure = [ "email-notify@%i.service" ];
 
   boot = {
     loader.grub = {
diff --git a/machines/deprecated/taurus/matrix-synapse.nix b/machines/deprecated/taurus/matrix-synapse.nix
@@ -14,7 +14,7 @@ in {
     paths             = [ "/var/lib/matrix-synapse" ];
   };
 
-  systemd.services.matrix-synapse.onFailure = [ "notify-failure@%i.service" ];
+  systemd.services.matrix-synapse.onFailure = [ "email-notify@%i.service" ];
 
   services = {
     postgresql = {
diff --git a/machines/deprecated/taurus/pleroma/default.nix b/machines/deprecated/taurus/pleroma/default.nix
@@ -12,7 +12,7 @@
   };
 
   systemd.services.pleroma.path      = [ pkgs.exiftool ];
-  systemd.services.pleroma.onFailure = [ "notify-failure@%i.service" ];
+  systemd.services.pleroma.onFailure = [ "email-notify@%i.service" ];
 
   services = {
     postgresql = {
diff --git a/machines/deprecated/taurus/syncthing.nix b/machines/deprecated/taurus/syncthing.nix
@@ -6,7 +6,7 @@
     ../../configurations/services/syncthing.nix
   ];
 
-  systemd.services.syncthing.onFailure = [ "notify-failure@%i.service" ];
+  systemd.services.syncthing.onFailure = [ "email-notify@%i.service" ];
 
   services = {
     syncthing = {
diff --git a/machines/lollo/router/dnsmasq.nix b/machines/lollo/router/dnsmasq.nix
@@ -15,7 +15,7 @@ in {
     home.AAAA = [ "2a0f:4ac0:acab::1" ];
   };
 
-  systemd.services.dnsmasq.onFailure = [ "notify-failure@%i.service" ];
+  systemd.services.dnsmasq.onFailure = [ "email-notify@%i.service" ];
 
   services = {
 
diff --git a/machines/lollo/smarthome/influxdb2.nix b/machines/lollo/smarthome/influxdb2.nix
@@ -4,7 +4,7 @@
 
   systemd.services.influxdb2 = {
     serviceConfig.ExecStartPost = "${pkgs.bash}/bin/bash -c 'until ${pkgs.netcat}/bin/nc -z 127.0.0.1 8086; do sleep 0.2; done'";
-    onFailure                   = [ "notify-failure@%i.service" ];
+    onFailure                   = [ "email-notify@%i.service" ];
   };
 
   services.influxdb2.enable = true;
diff --git a/machines/lollo/smarthome/mbusd.nix b/machines/lollo/smarthome/mbusd.nix
@@ -9,7 +9,7 @@
     requires  = [ "network-online.target" "dev-modbus0.device" ];
     wants     = [ "network-online.target" "dev-modbus0.device" ];
     after     = [ "network-online.target" "dev-modbus0.device" ];
-    onFailure = [ "notify-failure@%i.service" ];
+    onFailure = [ "email-notify@%i.service" ];
 
     serviceConfig = {
       ExecStart      = "${pkgs.mbusd}/bin/mbusd -d -v2 -L - -p /dev/modbus0 -s 9600 -m 8n1 -C 32 -N 3 -R 100 -W 500 -T 60";
diff --git a/machines/lollo/smarthome/serial2tcp.nix b/machines/lollo/smarthome/serial2tcp.nix
@@ -22,7 +22,7 @@ in {
     requires  = [ "network-online.target" "dev-jeelink0.device" ];
     wants     = [ "network-online.target" "dev-jeelink0.device" ];
     after     = [ "network-online.target" "dev-jeelink0.device" ];
-    onFailure = [ "notify-failure@%i.service" ];
+    onFailure = [ "email-notify@%i.service" ];
 
     serviceConfig = {
       ExecStartPre = "${pkgs.coreutils}/bin/stty -F /dev/jeelink0 raw -echo -echoe -echok speed 9600";
diff --git a/machines/lollo/smarthome/smartied.nix b/machines/lollo/smarthome/smartied.nix
@@ -396,7 +396,7 @@ in {
     wantedBy  = [ "multi-user.target" ];
     requires  = [ "network-online.target" "mbusd.service" "serial2tcp.service" "influxdb2.service" "zigbee2mqtt.service" ];
     after     = [ "network-online.target" "mbusd.service" "serial2tcp.service" "influxdb2.service" "zigbee2mqtt.service" ];
-    onFailure = [ "notify-failure@%i.service" ];
+    onFailure = [ "email-notify@%i.service" ];
 
     serviceConfig = {
       ExecStart    = "${pkgs.smartied}/bin/smartied";
diff --git a/machines/lollo/smarthome/zigbee2mqtt.nix b/machines/lollo/smarthome/zigbee2mqtt.nix
@@ -5,7 +5,7 @@
   systemd.services.zigbee2mqtt = {
     requires  = [ "mosquitto.service" ];
     after     = [ "mosquitto.service" ];
-    onFailure = [ "notify-failure@%i.service" ];
+    onFailure = [ "email-notify@%i.service" ];
   };
 
   services = {
diff --git a/machines/lollo/syncthing.nix b/machines/lollo/syncthing.nix
@@ -8,7 +8,7 @@
 
   dns.zones."${config.networking.domain}".subdomains."syncthing.${config.networking.hostName}".CNAME = [ "${config.networking.fqdn}." ];
 
-  systemd.services.sycnthing.onFailure = [ "notify-failure@%i.service" ];
+  systemd.services.sycnthing.onFailure = [ "email-notify@%i.service" ];
 
   services = {
     syncthing = {
diff --git a/machines/osterei/configuration.nix b/machines/osterei/configuration.nix
@@ -41,7 +41,7 @@
   age.secrets.restic-server-desastro.file = ../../secrets/restic-server/desastro.age;
   age.secrets.restic-server-hector.file   = ../../secrets/restic-server/hector.age;
 
-  systemd.services.nginx.onFailure = [ "notify-failure@%i.service" ];
+  systemd.services.nginx.onFailure = [ "email-notify@%i.service" ];
 
   boot = {
     loader.grub = {
diff --git a/machines/osterei/grafana/default.nix b/machines/osterei/grafana/default.nix
@@ -4,7 +4,7 @@
 
   dns.zones."ctu.cx".subdomains.grafana.CNAME = [ "${config.networking.fqdn}." ];
 
-  systemd.services.grafana.onFailure = [ "notify-failure@%i.service" ];
+  systemd.services.grafana.onFailure = [ "email-notify@%i.service" ];
 
   services = {
     grafana = {
diff --git a/machines/osterei/matrix-synapse.nix b/machines/osterei/matrix-synapse.nix
@@ -11,7 +11,7 @@
     paths             = [ "/var/lib/matrix-synapse" ];
   };
 
-  systemd.services.matrix-synapse.onFailure = [ "notify-failure@%i.service" ];
+  systemd.services.matrix-synapse.onFailure = [ "email-notify@%i.service" ];
 
   dns.zones."ctu.cx".subdomains.matrix.CNAME = [ "${config.networking.fqdn}." ];
 
diff --git a/machines/osterei/oeffi-web.nix b/machines/osterei/oeffi-web.nix
@@ -14,7 +14,7 @@
   systemd.services.oeffi-web = {
     wantedBy  = [ "multi-user.target" ];
     after     = [ "network.target" ];
-    onFailure = [ "notify-failure@%i.service" ];
+    onFailure = [ "email-notify@%i.service" ];
 
     serviceConfig = {
       User                    = "oeffisearch";
diff --git a/machines/osterei/oeffisearch.nix b/machines/osterei/oeffisearch.nix
@@ -20,7 +20,7 @@
   systemd.services.oeffisearch = {
     wantedBy  = [ "multi-user.target" ];
     after     = [ "network.target" ];
-    onFailure = [ "notify-failure@%i.service" ];
+    onFailure = [ "email-notify@%i.service" ];
 
     serviceConfig = {
       User                    = "oeffisearch";
diff --git a/machines/osterei/pleroma/default.nix b/machines/osterei/pleroma/default.nix
@@ -14,7 +14,7 @@
   dns.zones."ctu.cx".subdomains.pleroma.CNAME = [ "${config.networking.fqdn}." ];
 
   systemd.services.pleroma.path      = [ pkgs.exiftool ];
-  systemd.services.pleroma.onFailure = [ "notify-failure@%i.service" ];
+  systemd.services.pleroma.onFailure = [ "email-notify@%i.service" ];
 
   services = {
     postgresql = {
diff --git a/machines/osterei/prometheus.nix b/machines/osterei/prometheus.nix
@@ -4,7 +4,7 @@
 
   dns.zones."ctu.cx".subdomains.prometheus.CNAME = [ "${config.networking.fqdn}." ];
 
-  systemd.services.prometheus.onFailure = [ "notify-failure@%i.service" ];
+  systemd.services.prometheus.onFailure = [ "email-notify@%i.service" ];
 
   services = {
     prometheus = {
diff --git a/machines/osterei/radicale.nix b/machines/osterei/radicale.nix
@@ -18,7 +18,7 @@
 
   dns.zones."ctu.cx".subdomains.dav.CNAME = [ "${config.networking.fqdn}." ];
 
-  systemd.services.radicale.onFailure = [ "notify-failure@%i.service" ];
+  systemd.services.radicale.onFailure = [ "email-notify@%i.service" ];
 
   services = {
     radicale = {
diff --git a/machines/osterei/syncthing.nix b/machines/osterei/syncthing.nix
@@ -8,7 +8,7 @@
 
   dns.zones."${config.networking.domain}".subdomains."syncthing.${config.networking.hostName}".CNAME = [ "${config.networking.fqdn}." ];
 
-  systemd.services.syncthing.onFailure = [ "notify-failure@%i.service" ];
+  systemd.services.syncthing.onFailure = [ "email-notify@%i.service" ];
 
   services = {
     syncthing = {
diff --git a/machines/osterei/websites/wifionic.de.nix b/machines/osterei/websites/wifionic.de.nix
@@ -19,7 +19,7 @@ let
 in {
   systemd = {
     services.check-o2tiles = {
-      onFailure   = [ "notify-failure@%i.service" ];
+      onFailure   = [ "email-notify@%i.service" ];
       startAt     = "*-*-* 3:00:00";
       after       = [ "network-online.target" ];
       path        = [ pkgs.curl ];
diff --git a/modules/gotosocial.nix b/modules/gotosocial.nix
@@ -110,7 +110,7 @@ in {
         description   = "gotosocial export";
 
         startAt       = "*-*-* 1:00:00";
-        onFailure     = [ "notify-failure@%i.service" ];
+        onFailure     = [ "email-notify@%i.service" ];
 
         serviceConfig = {
           User = cfg.user;

@@ -129,7 +129,7 @@ in {
         description     = "GoToSocial ActivityPub Server";
         after           = [ "network-online.target" ];
         wantedBy        = [ "multi-user.target" ];
-        onFailure       = [ "notify-failure@%i.service" ];
+        onFailure       = [ "email-notify@%i.service" ];
 
         serviceConfig = {
           User = cfg.user;
diff --git a/modules/restic-backups.nix b/modules/restic-backups.nix
@@ -56,7 +56,7 @@ in {
       name: backup: nameValuePair "restic-backup-${name}" {
         restartIfChanged = false;
         requires         = [ "network.target" "local-fs.target" ];
-        onFailure        = [ "notify-failure@%i.service" ];
+        onFailure        = [ "email-notify@%i.service" ];
 
         path = [
           pkgs.restic