alsa: add option to change system wide configuration
This commit is contained in:
parent
7cdeb712c3
commit
c84d81541e
|
@ -9,6 +9,8 @@ let
|
||||||
|
|
||||||
soundState = "/var/lib/alsa/asound.state";
|
soundState = "/var/lib/alsa/asound.state";
|
||||||
|
|
||||||
|
configPaht = "asound.conf";
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -35,6 +37,17 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraConfig = mkOption {
|
||||||
|
type = types.lines;
|
||||||
|
default = '''';
|
||||||
|
example = ''
|
||||||
|
defaults.pcm.!card 3
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
Set addition configuration for system-wide alsa.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -46,6 +59,11 @@ in
|
||||||
|
|
||||||
environment.systemPackages = [ alsaUtils ];
|
environment.systemPackages = [ alsaUtils ];
|
||||||
|
|
||||||
|
environment.etc = [ { source = config.sound.extraConfig;
|
||||||
|
target = configPath;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
# ALSA provides a udev rule for restoring volume settings.
|
# ALSA provides a udev rule for restoring volume settings.
|
||||||
services.udev.packages = [ alsaUtils ];
|
services.udev.packages = [ alsaUtils ];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue