fix nix-autoupgrade email notification to use system msmtp config

This commit is contained in:
Noah Masur
2026-08-30 14:46:53 -06:00
parent a93fa75779
commit 72c4f4823b
2 changed files with 2 additions and 3 deletions
@@ -47,6 +47,7 @@ in
host = cfg.host; host = cfg.host;
passwordeval = "${pkgs.age}/bin/age --decrypt --identity ${config.identityFile} ${pkgs.writeText "mailpass-system.age" (builtins.readFile cfg.passwordFile)}"; passwordeval = "${pkgs.age}/bin/age --decrypt --identity ${config.identityFile} ${pkgs.writeText "mailpass-system.age" (builtins.readFile cfg.passwordFile)}";
user = cfg.user; user = cfg.user;
from = cfg.user;
from_full_name = "${config.networking.hostName} System"; from_full_name = "${config.networking.hostName} System";
port = 465; port = 465;
tls = true; tls = true;
@@ -6,7 +6,6 @@
}: }:
let let
inherit (config.nmasur.settings) username;
cfg = config.nmasur.presets.services.nix-autoupgrade; cfg = config.nmasur.presets.services.nix-autoupgrade;
in in
@@ -55,8 +54,7 @@ in
systemctl status $SERVICE_ID >> $TEMPFILE systemctl status $SERVICE_ID >> $TEMPFILE
set -e set -e
${lib.getExe pkgs.msmtp} \ ${lib.getExe pkgs.msmtp} \
--file=${config.home-manager.users.${username}.xdg.configHome}/msmtp/config \ --account=default \
--account=system \
${address} < $TEMPFILE ${address} < $TEMPFILE
''; '';
}; };