{ config, pkgs, lib, ... }: { options.dgn-notify = { enable = lib.mkEnableOption "DGNum email notification cli" // { default = true; }; }; config = lib.mkIf config.dgn-notify.enable { programs.msmtp = { enable = true; setSendmail = false; accounts.default = { tls = true; tls_starttls = false; port = 465; auth = true; host = "kurisu.lahfa.xyz"; from = "noreply@infra.dgnum.eu"; user = "web-services@infra.dgnum.eu"; passwordeval = "cat ${config.age.secrets.mail.path}"; }; }; services.systemd-notify = { enable = true; command = builtins.toString ( pkgs.writeShellScript "sendmail" '' ${pkgs.msmtp}/bin/sendmail -i -t <