From 152769aed96d4d6f005ab40daf03ec4f5102c763 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sun, 2 Aug 2020 14:05:18 +0200 Subject: [PATCH] xscreensaver: restart if settings change --- modules/services/xscreensaver.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/services/xscreensaver.nix b/modules/services/xscreensaver.nix index 73a365aa..ac6194e7 100644 --- a/modules/services/xscreensaver.nix +++ b/modules/services/xscreensaver.nix @@ -40,6 +40,10 @@ in { Description = "XScreenSaver"; After = [ "graphical-session-pre.target" ]; PartOf = [ "graphical-session.target" ]; + + # Make sure the service is restarted if the settings change. + X-Restart-Triggers = + [ (builtins.hashString "md5" (builtins.toJSON cfg.settings)) ]; }; Service = {