Explain rejected notifications.
And run as a dynamic user.
This commit is contained in:
parent
5fc207e38a
commit
b266cf9746
|
@ -50,6 +50,8 @@ in {
|
|||
path = [ tattler ];
|
||||
wantedBy = [ "default.target" ];
|
||||
serviceConfig = {
|
||||
DynamicUser = true;
|
||||
LoadCredential = [ "mqtt.passwd:${cfg.mqtt.password-file}" ];
|
||||
ExecStart = pkgs.writeShellScript "tattler.sh" (concatStringsSep " " ([
|
||||
"tattler"
|
||||
"--mqtt-host=${cfg.mqtt.host}"
|
||||
|
@ -59,7 +61,8 @@ in {
|
|||
] ++ (optional cfg.verbose "--verbose")
|
||||
++ (optional (cfg.mqtt.user != null) "--mqtt-user=${cfg.mqtt.user}")
|
||||
++ (optional (cfg.mqtt.password-file != null)
|
||||
"--mqtt-user=${cfg.mqtt.password-file}")));
|
||||
"--mqtt-user=$CREDENTIALS_DIRECTORY/mqtt.passwd")));
|
||||
Restart = "always";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
:body (:body note)
|
||||
:urgency (-> note :urgency (keyword))
|
||||
})
|
||||
(log/error! logger (format "rejecting invalid notification: %s" note)))
|
||||
(log/error! logger (format "rejecting invalid notification: %s"
|
||||
(->> note (t/explain Notification) (t/humanize)))))
|
||||
(recur (<! note-chan)))
|
||||
(log/info! logger "stopping")))))
|
||||
|
|
Loading…
Reference in New Issue