diff options
Diffstat (limited to 'nixos/modules/config')
-rw-r--r-- | nixos/modules/config/pulseaudio.nix | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/nixos/modules/config/pulseaudio.nix b/nixos/modules/config/pulseaudio.nix index bf66994b5022..bd80c8113483 100644 --- a/nixos/modules/config/pulseaudio.nix +++ b/nixos/modules/config/pulseaudio.nix @@ -240,11 +240,14 @@ in { }; systemd.user = { services.pulseaudio = { + restartIfChanged = true; serviceConfig = { RestartSec = "500ms"; + PassEnvironment = "DISPLAY"; }; - environment = { DISPLAY = ":${toString config.services.xserver.display}"; }; - restartIfChanged = true; + }; + sockets.pulseaudio = { + wantedBy = [ "sockets.target" ]; }; }; }) |