Merge pull request #15840 from anderspapitto/pulse-jack

pulseaudio service: set DISPLAY
This commit is contained in:
Joachim F 2016-07-16 13:26:39 +02:00 committed by GitHub
commit 8f43f111c0
4 changed files with 4 additions and 9 deletions

View File

@ -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 = {

View File

@ -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";
};

View File

@ -108,7 +108,7 @@ in {
RestartSec = 3;
Restart = "always";
};
environment = { DISPLAY = ":0"; };
environment = { DISPLAY = ":${toString config.services.xserver.display}"; };
};
};

View File

@ -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} \