mirror of
https://github.com/nmasur/dotfiles
synced 2025-01-31 13:22:04 +00:00
34 lines
738 B
Nix
34 lines
738 B
Nix
|
{
|
||
|
config,
|
||
|
lib,
|
||
|
...
|
||
|
}:
|
||
|
|
||
|
let
|
||
|
cfg = config.nmasur.presets.programs.yt-dlp;
|
||
|
in
|
||
|
|
||
|
{
|
||
|
|
||
|
options.nmasur.presets.programs.yt-dlp.enable = lib.mkEnableOption "yt-dlp media downloader";
|
||
|
|
||
|
config = lib.mkIf cfg.enable {
|
||
|
programs.yt-dlp = {
|
||
|
enable = true;
|
||
|
extraConfig = "";
|
||
|
settings = {
|
||
|
no-continue = true; # Always re-download each fragment
|
||
|
no-overwrites = true; # Don't overwrite existing files
|
||
|
download-archive = "archive.log"; # Log of archives
|
||
|
embed-metadata = true;
|
||
|
embed-thumbnail = true;
|
||
|
embed-subs = true;
|
||
|
sub-langs = "en.*";
|
||
|
concurrent-fragments = 4; # Parallel download chunks
|
||
|
};
|
||
|
};
|
||
|
|
||
|
programs.fish.shellAbbrs.yt = "yt-dlp";
|
||
|
};
|
||
|
}
|