alsa: add option to change system wide configuration

This commit is contained in:
Arseniy Seroka 2014-05-23 14:53:24 +04:00
parent 7cdeb712c3
commit c84d81541e

View File

@ -9,6 +9,8 @@ let
soundState = "/var/lib/alsa/asound.state";
configPaht = "asound.conf";
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.etc = [ { source = config.sound.extraConfig;
target = configPath;
}
];
# ALSA provides a udev rule for restoring volume settings.
services.udev.packages = [ alsaUtils ];