diff --git a/nixos/modules/config/pulseaudio.nix b/nixos/modules/config/pulseaudio.nix index a964e04531c..6984e85603f 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 = { diff --git a/nixos/modules/services/misc/cgminer.nix b/nixos/modules/services/misc/cgminer.nix index 868dc87f723..5f97cc03414 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"; }; diff --git a/nixos/modules/services/x11/redshift.nix b/nixos/modules/services/x11/redshift.nix index 8f1e317e52b..63ffa29c199 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}"; }; }; }; diff --git a/nixos/modules/services/x11/unclutter.nix b/nixos/modules/services/x11/unclutter.nix index 3260fdb3d54..ebc195d108d 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} \