diff --git a/modules/ntfy-alerts.nix b/modules/ntfy-alerts.nix index 6446e05..baaa193 100644 --- a/modules/ntfy-alerts.nix +++ b/modules/ntfy-alerts.nix @@ -97,6 +97,11 @@ in }; }; + # TODO: sanoid's ExecStartPre runs `zfs allow` which blocks on TXG sync; + # on the hdds pool (slow spinning disks + large async frees) this causes + # 30+ minute hangs and guaranteed timeouts. Suppress until we fix sanoid + # to run as root without `zfs allow`. See: nixpkgs#72060, openzfs/zfs#14180 + "sanoid".unitConfig.OnFailure = lib.mkForce ""; }; # Global OnFailure drop-in for all services @@ -105,6 +110,12 @@ in [Unit] OnFailure=ntfy-alert@%p.service '') + + # Sanoid-specific drop-in to override the global OnFailure (see TODO above) + (pkgs.writeTextDir "etc/systemd/system/sanoid.service.d/onfailure.conf" '' + [Unit] + OnFailure= + '') ]; # ZED (ZFS Event Daemon) ntfy notification settings services.zfs.zed = {