diff --git a/nixos/modules/services/misc/mediatomb.nix b/nixos/modules/services/misc/mediatomb.nix index ba2bbfbc221..bc7d1545829 100644 --- a/nixos/modules/services/misc/mediatomb.nix +++ b/nixos/modules/services/misc/mediatomb.nix @@ -9,6 +9,38 @@ let name = cfg.package.pname; pkg = cfg.package; optionYesNo = option: if option then "yes" else "no"; + transcodingConfig = if cfg.transcoding then with pkgs; '' + + + + + + + + + + audio/mpeg + no + yes + no + + + + + video/mpeg + yes + yes + yes + + + + + +'' else '' + + +''; mtConf = pkgs.writeText "config.xml" '' @@ -121,38 +153,12 @@ let - - - - - - - - - - audio/L16 - no - yes - no - - - - - video/mpeg - yes - yes - yes - - - - - + ${transcodingConfig} - ''; +''; in { - ###### interface options = {