{ config, lib, pkgs, ... }: with lib; let checkConditions = pkgs.writeScript "checkConditions" '' #!/bin/sh STATUS=$(systemctl status --full "$1") case "$STATUS" in *"activating (auto-restart) (Result: timeout)"*) exit 1 ;; *) exit 0 ;; esac ''; sendmail = pkgs.writeScript "sendmail" '' #!/bin/sh ${pkgs.system-sendmail}/bin/sendmail -t <