From eba3f92ef912b5b50ad40e20474fafa04c6e5ca7 Mon Sep 17 00:00:00 2001 From: Anders Papitto Date: Tue, 5 Jul 2016 19:17:14 -0700 Subject: [PATCH 1/4] pulseaudio: set DISPLAY --- nixos/modules/config/pulseaudio.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/config/pulseaudio.nix b/nixos/modules/config/pulseaudio.nix index a964e04531c1..6984e85603f6 100644 --- a/nixos/modules/config/pulseaudio.nix +++ b/nixos/modules/config/pulseaudio.nix @@ -161,6 +161,7 @@ in { ExecStart = "${getBin cfg.package}/bin/pulseaudio --daemonize=no"; Restart = "on-failure"; }; + environment = { DISPLAY = ":${toString config.services.xserver.display}"; }; }; sockets.pulseaudio = { From 874df3fe7006c64d494ca7c3860d6a2ce3ecf73c Mon Sep 17 00:00:00 2001 From: Anders Papitto Date: Tue, 5 Jul 2016 19:17:40 -0700 Subject: [PATCH 2/4] cgminer: respect xserver.display variable --- nixos/modules/services/misc/cgminer.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/misc/cgminer.nix b/nixos/modules/services/misc/cgminer.nix index 868dc87f7238..5f97cc034148 100644 --- a/nixos/modules/services/misc/cgminer.nix +++ b/nixos/modules/services/misc/cgminer.nix @@ -126,7 +126,7 @@ in environment = { LD_LIBRARY_PATH = ''/run/opengl-driver/lib:/run/opengl-driver-32/lib''; - DISPLAY = ":0"; + DISPLAY = ":${toString config.services.xserver.display}"; GPU_MAX_ALLOC_PERCENT = "100"; GPU_USE_SYNC_OBJECTS = "1"; }; From 54fa0cfe4eef7e54e23380704af70ee7b65473ce Mon Sep 17 00:00:00 2001 From: Anders Papitto Date: Tue, 5 Jul 2016 19:18:00 -0700 Subject: [PATCH 3/4] redshift: respect xserver.display variable --- nixos/modules/services/x11/redshift.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/x11/redshift.nix b/nixos/modules/services/x11/redshift.nix index 8f1e317e52b0..63ffa29c1997 100644 --- a/nixos/modules/services/x11/redshift.nix +++ b/nixos/modules/services/x11/redshift.nix @@ -108,7 +108,7 @@ in { RestartSec = 3; Restart = "always"; }; - environment = { DISPLAY = ":0"; }; + environment = { DISPLAY = ":${toString config.services.xserver.display}"; }; }; }; From 49879fa96b91d64e3c1a77ffe9665c65df24e332 Mon Sep 17 00:00:00 2001 From: Anders Papitto Date: Tue, 5 Jul 2016 19:18:21 -0700 Subject: [PATCH 4/4] unclutter: respect xserver.display variable --- nixos/modules/services/x11/unclutter.nix | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/nixos/modules/services/x11/unclutter.nix b/nixos/modules/services/x11/unclutter.nix index 3260fdb3d54d..ebc195d108d0 100644 --- a/nixos/modules/services/x11/unclutter.nix +++ b/nixos/modules/services/x11/unclutter.nix @@ -39,12 +39,6 @@ in { default = 1; }; - displayName = mkOption { - description = "Name of the X11 display"; - type = types.str; - default = ":0"; - }; - excluded = mkOption { description = "Names of windows where unclutter should not apply"; type = types.listOf types.str; @@ -67,7 +61,7 @@ in { serviceConfig.ExecStart = '' ${cfg.package}/bin/unclutter \ -idle ${toString cfg.timeout} \ - -display ${cfg.displayName} \ + -display :${toString config.services.xserver.display} \ -jitter ${toString (cfg.threeshold - 1)} \ ${optionalString cfg.keystroke "-keystroke"} \ ${concatMapStrings (x: " -"+x) cfg.extraOptions} \