cli/yt-dlp: use a list of args for extraConfig

This commit is contained in:
Elec3137 2026-02-28 16:10:56 -08:00
commit 202de6511f

View file

@ -16,24 +16,24 @@ in
package = lib.mkPackageOption pkgs name { };
extraConfig = lib.mkOption {
type = lib.types.lines;
default = ''
--no-write-auto-subs
--sub-langs all,-live_chat
type = lib.types.listOf lib.types.str;
description = "List of commandline arguments";
default = [
"--no-write-auto-subs"
"--sub-langs=all,-live_chat"
--embed-subs
--embed-metadata
--embed-chapters
"--embed-subs"
"--embed-metadata"
"--embed-chapters"
"--sponsorblock-mark=all"
--sponsorblock-mark all
--paths temp:/tmp
'';
"--paths=temp:/tmp"
];
};
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
environment.etc."${name}.conf".text = cfg.extraConfig;
environment.etc."${name}.conf".text = builtins.concatStringsSep "\n" cfg.extraConfig;
};
}