nixos/pipewire: fix wireplumber with system-wide
This commit is contained in:
parent
2f63b7dad4
commit
33163bd0ef
|
@ -37,11 +37,19 @@ in
|
||||||
environment.systemPackages = [ cfg.package ];
|
environment.systemPackages = [ cfg.package ];
|
||||||
|
|
||||||
environment.etc."wireplumber/main.lua.d/80-nixos.lua" = lib.mkIf (!pwUsedForAudio) {
|
environment.etc."wireplumber/main.lua.d/80-nixos.lua" = lib.mkIf (!pwUsedForAudio) {
|
||||||
text = ''
|
text = ''
|
||||||
-- Pipewire is not used for audio, so prevent it from grabbing audio devices
|
-- Pipewire is not used for audio, so prevent it from grabbing audio devices
|
||||||
alsa_monitor.enable = function() end
|
alsa_monitor.enable = function() end
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
environment.etc."wireplumber/main.lua.d/80-systemwide.lua" = lib.mkIf config.services.pipewire.systemWide {
|
||||||
|
text = ''
|
||||||
|
-- When running system-wide, these settings need to be disabled (they
|
||||||
|
-- use functions that aren't available on the system dbus).
|
||||||
|
alsa_monitor.properties["alsa.reserve"] = false
|
||||||
|
default_access.properties["enable-flatpak-portal"] = false
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
systemd.packages = [ cfg.package ];
|
systemd.packages = [ cfg.package ];
|
||||||
|
|
||||||
|
@ -50,5 +58,10 @@ in
|
||||||
|
|
||||||
systemd.services.wireplumber.wantedBy = [ "pipewire.service" ];
|
systemd.services.wireplumber.wantedBy = [ "pipewire.service" ];
|
||||||
systemd.user.services.wireplumber.wantedBy = [ "pipewire.service" ];
|
systemd.user.services.wireplumber.wantedBy = [ "pipewire.service" ];
|
||||||
|
|
||||||
|
systemd.services.wireplumber.environment = lib.mkIf config.services.pipewire.systemWide {
|
||||||
|
# Force wireplumber to use system dbus.
|
||||||
|
DBUS_SESSION_BUS_ADDRESS = "unix:path=/run/dbus/system_bus_socket";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue