diff options
Diffstat (limited to 'nixos/modules/services/x11/unclutter.nix')
-rw-r--r-- | nixos/modules/services/x11/unclutter.nix | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/nixos/modules/services/x11/unclutter.nix b/nixos/modules/services/x11/unclutter.nix index a22e5ac2c95a..5f16a680050d 100644 --- a/nixos/modules/services/x11/unclutter.nix +++ b/nixos/modules/services/x11/unclutter.nix @@ -56,19 +56,17 @@ in { config = mkIf cfg.enable { systemd.user.services.unclutter = { description = "unclutter"; - wantedBy = [ "default.target" ]; + wantedBy = [ "graphical-session.target" ]; + partOf = [ "graphical-session.target" ]; serviceConfig.ExecStart = '' ${cfg.package}/bin/unclutter \ -idle ${toString cfg.timeout} \ - -display :${toString ( - let display = config.services.xserver.display; - in if display != null then display else 0 - )} \ -jitter ${toString (cfg.threeshold - 1)} \ ${optionalString cfg.keystroke "-keystroke"} \ ${concatMapStrings (x: " -"+x) cfg.extraOptions} \ -not ${concatStringsSep " " cfg.excluded} \ ''; + serviceConfig.PassEnvironment = "DISPLAY"; serviceConfig.RestartSec = 3; serviceConfig.Restart = "always"; }; |