about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSymphorien Gibol <symphorien+git@xlumurb.eu>2021-04-24 17:12:51 +0200
committerSymphorien Gibol <symphorien+git@xlumurb.eu>2021-04-24 17:12:51 +0200
commitddf567cd5a26eefab925ebc2e50d15d61e82257a (patch)
tree1fd571c4d7ff3014794c79831abc1090e4a87b75
parente4e75149fd5564a633a56af4a6c21a9d2f68c7ba (diff)
nixos/nagios: use the correct option to restart on config change
X-ReloadIfChanged is incorrect, apparently https://github.com/NixOS/nixpkgs/pull/120324#discussion_r619472321
We restart instead of reloading because nagios unit file has no
ExecReload.
-rw-r--r--nixos/modules/services/monitoring/nagios.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/monitoring/nagios.nix b/nixos/modules/services/monitoring/nagios.nix
index 9ac6869068f2b..61214508a9c6e 100644
--- a/nixos/modules/services/monitoring/nagios.nix
+++ b/nixos/modules/services/monitoring/nagios.nix
@@ -192,6 +192,7 @@ in
       path     = [ pkgs.nagios ] ++ cfg.plugins;
       wantedBy = [ "multi-user.target" ];
       after    = [ "network.target" ];
+      restartTriggers = [ nagiosCfgFile ];
 
       serviceConfig = {
         User = "nagios";
@@ -201,7 +202,6 @@ in
         LogsDirectory = "nagios";
         StateDirectory = "nagios";
         ExecStart = "${pkgs.nagios}/bin/nagios /etc/nagios.cfg";
-        X-ReloadIfChanged = nagiosCfgFile;
       };
     };