summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorPiotr Bogdan <ppbogdan@gmail.com>2017-04-02 19:23:12 +0100
committerPiotr Bogdan <ppbogdan@gmail.com>2017-04-03 18:41:11 +0100
commitc91c3209f3dbaf9dacef69395e071a9dee59bbee (patch)
tree08c67348661df182f9bf1a8b2de7e75db1e77c89 /nixos
parenta77571399d71167bf16b4183090a6f7e203d7e0f (diff)
downloadnixpkgs-c91c3209f3dbaf9dacef69395e071a9dee59bbee.tar
nixpkgs-c91c3209f3dbaf9dacef69395e071a9dee59bbee.tar.gz
nixpkgs-c91c3209f3dbaf9dacef69395e071a9dee59bbee.tar.bz2
nixpkgs-c91c3209f3dbaf9dacef69395e071a9dee59bbee.tar.lz
nixpkgs-c91c3209f3dbaf9dacef69395e071a9dee59bbee.tar.xz
nixpkgs-c91c3209f3dbaf9dacef69395e071a9dee59bbee.tar.zst
nixpkgs-c91c3209f3dbaf9dacef69395e071a9dee59bbee.zip
unclutter: Fix default value of $DISPLAY
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/x11/unclutter.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/services/x11/unclutter.nix b/nixos/modules/services/x11/unclutter.nix
index 6c789b7578f..a22e5ac2c95 100644
--- a/nixos/modules/services/x11/unclutter.nix
+++ b/nixos/modules/services/x11/unclutter.nix
@@ -60,7 +60,10 @@ in {
       serviceConfig.ExecStart = ''
         ${cfg.package}/bin/unclutter \
           -idle ${toString cfg.timeout} \
-          -display :${toString config.services.xserver.display} \
+          -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} \