mirror of
https://github.com/nmasur/dotfiles
synced 2026-09-08 14:46:08 +00:00
fix nix-autoupgrade email notification to use system msmtp config
This commit is contained in:
@@ -47,6 +47,7 @@ in
|
||||
host = cfg.host;
|
||||
passwordeval = "${pkgs.age}/bin/age --decrypt --identity ${config.identityFile} ${pkgs.writeText "mailpass-system.age" (builtins.readFile cfg.passwordFile)}";
|
||||
user = cfg.user;
|
||||
from = cfg.user;
|
||||
from_full_name = "${config.networking.hostName} System";
|
||||
port = 465;
|
||||
tls = true;
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (config.nmasur.settings) username;
|
||||
cfg = config.nmasur.presets.services.nix-autoupgrade;
|
||||
in
|
||||
|
||||
@@ -55,8 +54,7 @@ in
|
||||
systemctl status $SERVICE_ID >> $TEMPFILE
|
||||
set -e
|
||||
${lib.getExe pkgs.msmtp} \
|
||||
--file=${config.home-manager.users.${username}.xdg.configHome}/msmtp/config \
|
||||
--account=system \
|
||||
--account=default \
|
||||
${address} < $TEMPFILE
|
||||
'';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user