pulseaudio: Resolve conflicting asound.conf of pulseaudio and alsa
Fixes issue #25790.
This commit is contained in:
parent
d4f45ae393
commit
44fadbb9bd
@ -6,6 +6,7 @@ with lib;
|
|||||||
let
|
let
|
||||||
|
|
||||||
cfg = config.hardware.pulseaudio;
|
cfg = config.hardware.pulseaudio;
|
||||||
|
alsaCfg = config.sound;
|
||||||
|
|
||||||
systemWide = cfg.enable && cfg.systemWide;
|
systemWide = cfg.enable && cfg.systemWide;
|
||||||
nonSystemWide = cfg.enable && !cfg.systemWide;
|
nonSystemWide = cfg.enable && !cfg.systemWide;
|
||||||
@ -76,6 +77,7 @@ let
|
|||||||
ctl.!default {
|
ctl.!default {
|
||||||
type pulse
|
type pulse
|
||||||
}
|
}
|
||||||
|
${alsaCfg.extraConfig}
|
||||||
'');
|
'');
|
||||||
|
|
||||||
in {
|
in {
|
||||||
|
@ -7,6 +7,8 @@ let
|
|||||||
|
|
||||||
inherit (pkgs) alsaUtils;
|
inherit (pkgs) alsaUtils;
|
||||||
|
|
||||||
|
pulseaudioEnabled = config.hardware.pulseaudio.enable;
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -80,7 +82,7 @@ in
|
|||||||
|
|
||||||
environment.systemPackages = [ alsaUtils ];
|
environment.systemPackages = [ alsaUtils ];
|
||||||
|
|
||||||
environment.etc = mkIf (config.sound.extraConfig != "")
|
environment.etc = mkIf (!pulseaudioEnabled && config.sound.extraConfig != "")
|
||||||
[
|
[
|
||||||
{ source = pkgs.writeText "asound.conf" config.sound.extraConfig;
|
{ source = pkgs.writeText "asound.conf" config.sound.extraConfig;
|
||||||
target = "asound.conf";
|
target = "asound.conf";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user