diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2020-05-08 16:38:16 +0200 |
---|---|---|
committer | Dominique Martinet <asmadeus@codewreck.org> | 2020-05-10 23:05:19 +0200 |
commit | a4763da299ff20bc7f50ee611b311c236b79dea4 (patch) | |
tree | 3506b36cdefa368f609825f79d46ade39f4442a1 /nixos/modules/services/audio/mpd.nix | |
parent | df3554a4191a56af551aa9273a5894f60671d520 (diff) |
nixos/mpd: add services.mpd.fluidsynth option
fluidsynth is compiled in but soundfont-fluid needs to be explicitely
pulled in and path configured, an option makes it much simpler to use
Diffstat (limited to 'nixos/modules/services/audio/mpd.nix')
-rw-r--r-- | nixos/modules/services/audio/mpd.nix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/nixos/modules/services/audio/mpd.nix b/nixos/modules/services/audio/mpd.nix index f4eb4a265a46..1d2a982ac536 100644 --- a/nixos/modules/services/audio/mpd.nix +++ b/nixos/modules/services/audio/mpd.nix @@ -21,6 +21,12 @@ let ${optionalString (cfg.network.listenAddress != "any") ''bind_to_address "${cfg.network.listenAddress}"''} ${optionalString (cfg.network.port != 6600) ''port "${toString cfg.network.port}"''} + ${optionalString (cfg.fluidsynth) '' + decoder { + plugin "fluidsynth" + soundfont "${pkgs.soundfont-fluid}/share/soundfonts/FluidR3_GM2-2.sf2" + } + ''} ${cfg.extraConfig} ''; @@ -133,6 +139,14 @@ in { parameter is omitted from the configuration. ''; }; + + fluidsynth = mkOption { + type = types.bool; + default = false; + description = '' + If set, add fluidsynth soundfont and configure the plugin. + ''; + }; }; }; |