From 3e7d650bcca2fb18cc05468878cbccfb06096f7b Mon Sep 17 00:00:00 2001 From: Pascal Bach Date: Fri, 15 May 2020 13:41:19 +0200 Subject: [PATCH] nixos/unifi: restart service on package update Currently the service doesn't detect if on of the packages is updated and doesn't restart. By manually adding a trigger we make sure the service restarts if any of the involved packages update. --- nixos/modules/services/networking/unifi.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/networking/unifi.nix b/nixos/modules/services/networking/unifi.nix index 4bdfa8143dc..62bcf7a1497 100644 --- a/nixos/modules/services/networking/unifi.nix +++ b/nixos/modules/services/networking/unifi.nix @@ -162,6 +162,8 @@ in unitConfig.RequiresMountsFor = stateDir; # This a HACK to fix missing dependencies of dynamic libs extracted from jars environment.LD_LIBRARY_PATH = with pkgs.stdenv; "${cc.cc.lib}/lib"; + # Make sure package upgrades trigger a service restart + restartTriggers = [ cfg.unifiPackage cfg.mongodbPackage ]; serviceConfig = { Type = "simple";