nixos/pipewire: enable volume control via alsa
This commit is contained in:
parent
b28f2f7386
commit
906d68cf13
|
@ -117,24 +117,26 @@ in {
|
||||||
services.udev.packages = [ cfg.package ];
|
services.udev.packages = [ cfg.package ];
|
||||||
|
|
||||||
# If any paths are updated here they must also be updated in the package test.
|
# If any paths are updated here they must also be updated in the package test.
|
||||||
sound.enable = mkIf cfg.alsa.enable true;
|
environment.etc."alsa/conf.d/49-pipewire-modules.conf" = mkIf cfg.alsa.enable {
|
||||||
sound.extraConfig = mkIf cfg.alsa.enable ''
|
text = ''
|
||||||
pcm_type.pipewire {
|
pcm_type.pipewire {
|
||||||
libs.native = ${cfg.package.lib}/lib/alsa-lib/libasound_module_pcm_pipewire.so ;
|
libs.native = ${cfg.package.lib}/lib/alsa-lib/libasound_module_pcm_pipewire.so ;
|
||||||
${optionalString enable32BitAlsaPlugins
|
${optionalString enable32BitAlsaPlugins
|
||||||
"libs.32Bit = ${pkgs.pkgsi686Linux.pipewire.lib}/lib/alsa-lib/libasound_module_pcm_pipewire.so ;"}
|
"libs.32Bit = ${pkgs.pkgsi686Linux.pipewire.lib}/lib/alsa-lib/libasound_module_pcm_pipewire.so ;"}
|
||||||
}
|
}
|
||||||
pcm.!default {
|
ctl_type.pipewire {
|
||||||
@func getenv
|
libs.native = ${cfg.package.lib}/lib/alsa-lib/libasound_module_ctl_pipewire.so ;
|
||||||
vars [ PCM ]
|
${optionalString enable32BitAlsaPlugins
|
||||||
default "plug:pipewire"
|
"libs.32Bit = ${pkgs.pkgsi686Linux.pipewire.lib}/lib/alsa-lib/libasound_module_ctl_pipewire.so ;"}
|
||||||
playback_mode "-1"
|
}
|
||||||
capture_mode "-1"
|
'';
|
||||||
}
|
};
|
||||||
'';
|
|
||||||
environment.etc."alsa/conf.d/50-pipewire.conf" = mkIf cfg.alsa.enable {
|
environment.etc."alsa/conf.d/50-pipewire.conf" = mkIf cfg.alsa.enable {
|
||||||
source = "${cfg.package}/share/alsa/alsa.conf.d/50-pipewire.conf";
|
source = "${cfg.package}/share/alsa/alsa.conf.d/50-pipewire.conf";
|
||||||
};
|
};
|
||||||
|
environment.etc."alsa/conf.d/99-pipewire-default.conf" = mkIf cfg.alsa.enable {
|
||||||
|
source = "${cfg.package}/share/alsa/alsa.conf.d/99-pipewire-default.conf";
|
||||||
|
};
|
||||||
environment.sessionVariables.LD_LIBRARY_PATH =
|
environment.sessionVariables.LD_LIBRARY_PATH =
|
||||||
lib.optional cfg.jack.enable "/run/current-system/sw/lib/pipewire";
|
lib.optional cfg.jack.enable "/run/current-system/sw/lib/pipewire";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue