mirror of
https://github.com/nmasur/dotfiles
synced 2026-09-08 13:36:09 +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;
|
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
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user