0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

nixos/modules/services/audio/alsa.nix: fix evaluation

https://github.com/NixOS/nixpkgs/issues/2732
This commit is contained in:
Peter Simons 2014-05-23 19:20:16 +02:00
parent 78618e12d3
commit c18775837c

View file

@ -7,10 +7,6 @@ let
inherit (pkgs) alsaUtils; inherit (pkgs) alsaUtils;
soundState = "/var/lib/alsa/asound.state";
configPath = "asound.conf";
in in
{ {
@ -39,7 +35,7 @@ in
extraConfig = mkOption { extraConfig = mkOption {
type = types.lines; type = types.lines;
default = ''''; default = "";
example = '' example = ''
defaults.pcm.!card 3 defaults.pcm.!card 3
''; '';
@ -59,8 +55,10 @@ in
environment.systemPackages = [ alsaUtils ]; environment.systemPackages = [ alsaUtils ];
environment.etc = [ { source = config.sound.extraConfig; environment.etc = mkIf (config.sound.extraConfig != "")
target = configPath; [
{ source = pkgs.writeText "asound.conf" config.sound.extraConfig;
target = "asound.conf";
} }
]; ];