x11 session: Don't start pulseaudio if it already is running system-wide

This commit is contained in:
Rickard Nilsson 2013-07-23 19:04:40 +02:00
parent cd0da98b03
commit 462e4255fa

View file

@ -75,8 +75,10 @@ let
if test "''${1:0:1}" = /; then eval exec "$1"; fi
# Start PulseAudio if enabled.
${optionalString config.hardware.pulseaudio.enable ''
${pkgs.pulseaudio}/bin/pulseaudio --start
${optionalString (config.hardware.pulseaudio.enable) ''
${optionalString (!config.hardware.pulseaudio.systemWide)
"${pkgs.pulseaudio}/bin/pulseaudio --start"
}
# Publish access credentials in the root window.
${pkgs.pulseaudio}/bin/pactl load-module module-x11-publish "display=$DISPLAY"