diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2020-11-26 10:59:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-26 10:59:17 +0100 |
commit | e95cc8519b0c778f40ad9722d8d7a4c543c81686 (patch) | |
tree | eeb422988b271b997bf665402b7f2cef9bba5084 /nixos/modules | |
parent | 603c0d4e742f4a5cf7dea01590bb775f0e69fb07 (diff) | |
parent | aca97840da9a85ddf65ea33fa778a35d8d88bb4b (diff) |
Merge pull request #104553 from jansol/pipewire
pipewire: 0.3.15 -> 0.3.16
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/desktops/pipewire.nix | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/nixos/modules/services/desktops/pipewire.nix b/nixos/modules/services/desktops/pipewire.nix index 5179cbaf6bc22..c4923cfd3f00c 100644 --- a/nixos/modules/services/desktops/pipewire.nix +++ b/nixos/modules/services/desktops/pipewire.nix @@ -17,10 +17,6 @@ let mkdir -p "$out/lib" ln -s "${pkgs.pipewire.jack}/lib" "$out/lib/pipewire" ''; - pulse-libs = pkgs.runCommand "pulse-libs" {} '' - mkdir -p "$out/lib" - ln -s "${pkgs.pipewire.pulse}/lib" "$out/lib/pipewire" - ''; in { meta = { @@ -50,7 +46,7 @@ in { }; pulse = { - enable = mkEnableOption "PulseAudio emulation"; + enable = mkEnableOption "PulseAudio server emulation"; }; }; }; @@ -61,23 +57,24 @@ in { assertions = [ { assertion = cfg.pulse.enable -> !config.hardware.pulseaudio.enable; - message = "PipeWire based PulseAudio emulation doesn't use the PulseAudio service"; + message = "PipeWire based PulseAudio server emulation replaces PulseAudio"; } { assertion = cfg.jack.enable -> !config.services.jack.jackd.enable; - message = "PIpeWire based JACK emulation doesn't use the JACK service"; + message = "PipeWire based JACK emulation doesn't use the JACK service"; } ]; environment.systemPackages = [ pkgs.pipewire ] - ++ lib.optional cfg.jack.enable jack-libs - ++ lib.optional cfg.pulse.enable pulse-libs; + ++ lib.optional cfg.jack.enable jack-libs; - systemd.packages = [ pkgs.pipewire ]; + systemd.packages = [ pkgs.pipewire ] + ++ lib.optional cfg.pulse.enable pkgs.pipewire.pulse; # PipeWire depends on DBUS but doesn't list it. Without this booting # into a terminal results in the service crashing with an error. systemd.user.sockets.pipewire.wantedBy = lib.mkIf cfg.socketActivation [ "sockets.target" ]; + systemd.user.sockets.pipewire-pulse.wantedBy = lib.mkIf (cfg.socketActivation && cfg.pulse.enable) ["sockets.target"]; systemd.user.services.pipewire.bindsTo = [ "dbus.service" ]; services.udev.packages = [ pkgs.pipewire ]; @@ -100,6 +97,6 @@ in { source = "${pkgs.pipewire}/share/alsa/alsa.conf.d/50-pipewire.conf"; }; environment.sessionVariables.LD_LIBRARY_PATH = - lib.optional (cfg.jack.enable || cfg.pulse.enable) "/run/current-system/sw/lib/pipewire"; + lib.optional cfg.jack.enable "/run/current-system/sw/lib/pipewire"; }; } |