diff --git a/modules/services/xidlehook.nix b/modules/services/xidlehook.nix index 8c8c874a4..77b4c1dfe 100644 --- a/modules/services/xidlehook.nix +++ b/modules/services/xidlehook.nix @@ -151,8 +151,8 @@ in { Service = { Type = if cfg.once then "oneshot" else "simple"; ExecStart = "${script}"; - }; + } // lib.optionalAttrs (!cfg.once) { Restart = "always"; }; Install.WantedBy = [ "graphical-session.target" ]; - } // pkgs.lib.optionalAttrs (!cfg.once) { Restart = "always"; }; + }; }; }