diff options
author | Michael Alan Dorman <mdorman@ironicdesign.com> | 2018-09-13 20:03:31 -0400 |
---|---|---|
committer | Michael Alan Dorman <mdorman@ironicdesign.com> | 2018-09-13 20:05:02 -0400 |
commit | c76312aea57509327f1242aaff4a3241154ede26 (patch) | |
tree | a0c6ba656428c7d57b79c2132b5ca682291797df /nixos | |
parent | 2ff2b89fdfa88fdf2880e609388f99026c1a1b5d (diff) |
airsonic: provide additional jvm configuration
This allows the user, among other things, to configure jukebox output to go to non-default alsa devices.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/misc/airsonic.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/nixos/modules/services/misc/airsonic.nix b/nixos/modules/services/misc/airsonic.nix index 083587b8ebb1b..01d7b3cf6b9dd 100644 --- a/nixos/modules/services/misc/airsonic.nix +++ b/nixos/modules/services/misc/airsonic.nix @@ -73,6 +73,24 @@ in { ${cfg.home}/transcoders. ''; }; + + jvmOptions = mkOption { + description = '' + Extra command line options for the JVM running AirSonic. + Useful for sending jukebox output to non-default alsa + devices. + ''; + default = [ + ]; + type = types.listOf types.str; + example = [ + "-Djavax.sound.sampled.Clip='#CODEC [plughw:1,0]'" + "-Djavax.sound.sampled.Port='#Port CODEC [hw:1]'" + "-Djavax.sound.sampled.SourceDataLine='#CODEC [plughw:1,0]'" + "-Djavax.sound.sampled.TargetDataLine='#CODEC [plughw:1,0]'" + ]; + }; + }; }; @@ -98,6 +116,7 @@ in { -Dserver.port=${toString cfg.port} \ -Dairsonic.contextPath=${cfg.contextPath} \ -Djava.awt.headless=true \ + ${toString cfg.jvmOptions} \ -verbose:gc \ -jar ${pkgs.airsonic}/webapps/airsonic.war ''; |