Skip to content

Commit 179281e

Browse files
authored
nixos/pipewire: support system wide pipewire-pulse service (#389565)
2 parents d6a237c + 05b4964 commit 179281e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

nixos/modules/services/desktops/pipewire/pipewire.nix

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,10 +372,13 @@ in
372372
) "${lv2Plugins}/lib/lv2";
373373

374374
# Mask pw-pulse if it's not wanted
375-
systemd.user.services.pipewire-pulse.enable = cfg.pulse.enable;
376-
systemd.user.sockets.pipewire-pulse.enable = cfg.pulse.enable;
375+
systemd.services.pipewire-pulse.enable = cfg.pulse.enable && cfg.systemWide;
376+
systemd.sockets.pipewire-pulse.enable = cfg.pulse.enable && cfg.systemWide;
377+
systemd.user.services.pipewire-pulse.enable = cfg.pulse.enable && !cfg.systemWide;
378+
systemd.user.sockets.pipewire-pulse.enable = cfg.pulse.enable && !cfg.systemWide;
377379

378380
systemd.sockets.pipewire.wantedBy = mkIf cfg.socketActivation [ "sockets.target" ];
381+
systemd.sockets.pipewire-pulse.wantedBy = mkIf cfg.socketActivation [ "sockets.target" ];
379382
systemd.user.sockets.pipewire.wantedBy = mkIf cfg.socketActivation [ "sockets.target" ];
380383
systemd.user.sockets.pipewire-pulse.wantedBy = mkIf cfg.socketActivation [ "sockets.target" ];
381384

0 commit comments

Comments
 (0)