youtube-dl: Add

pull/48/head
Simon Bruder 2021-02-08 20:40:54 +01:00
parent d6d2857322
commit 8c92c1b792
Signed by: simon
GPG Key ID: 8D3C82F9F309F8EC
3 changed files with 27 additions and 1 deletions

View File

@ -19,6 +19,7 @@
./vdirsyncer.nix
./xcompose.nix
./xdg.nix
./youtube-dl.nix
./zathura.nix
./zsh.nix
];

View File

@ -115,7 +115,6 @@ in
mkvtoolnix-cli # matroska (de-)muxing
unstable.waifu2x-converter-cpp # super-resolution for anime-style images
waifu2x-photo # waifu2x-converter-cpp for real life photos
youtube-dl # universal video downloader
# audio
abcde # cd ripper

View File

@ -0,0 +1,26 @@
{ lib, pkgs, ... }:
let
formats = (lib.flatten
(lib.crossLists (x: y: [ "${x}+${y}" ])
[
[ "bestvideo[vcodec^=av01]" "bestvideo[vcodec^=vp9]" "bestvideo[vcodec^=avc1]" "bestvideo" ]
[ "bestaudio[acodec^=opus]" "bestaudio[acodec^=mp4a]" "bestaudio" ]
])) ++ [
"best"
];
options = {
format = lib.concatStringsSep "/" formats;
};
in
{
xdg.configFile."youtube-dl/config".text = lib.concatStringsSep
"\n"
(lib.mapAttrsToList
(k: v: "--${k} ${v}")
options);
home.packages = with pkgs; [
youtube-dl
];
}