From 53d5d2be6da58a50807997f42ececd8145358513 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Tue, 13 Aug 2024 09:11:02 +0200 Subject: [PATCH] nixos/ups: restart upsdrv.service on config changes Or else new configuration won't take effect until the next boot (or if the user manually restarts the service). (cherry picked from commit dc7379e04f7fa74da6a19364994467e94db61381) --- nixos/modules/services/monitoring/ups.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nixos/modules/services/monitoring/ups.nix b/nixos/modules/services/monitoring/ups.nix index 0a0d5eadccd3..3c102be691c3 100644 --- a/nixos/modules/services/monitoring/ups.nix +++ b/nixos/modules/services/monitoring/ups.nix @@ -560,6 +560,9 @@ in }; environment.NUT_CONFPATH = "/etc/nut"; environment.NUT_STATEPATH = "/var/lib/nut"; + restartTriggers = [ + config.environment.etc."nut/ups.conf".source + ]; }; environment.etc = {