youtube-dl: Add
This commit is contained in:
parent
d6d2857322
commit
8c92c1b792
|
@ -19,6 +19,7 @@
|
|||
./vdirsyncer.nix
|
||||
./xcompose.nix
|
||||
./xdg.nix
|
||||
./youtube-dl.nix
|
||||
./zathura.nix
|
||||
./zsh.nix
|
||||
];
|
||||
|
|
|
@ -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
|
||||
|
|
26
users/simon/modules/youtube-dl.nix
Normal file
26
users/simon/modules/youtube-dl.nix
Normal 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
|
||||
];
|
||||
}
|
Loading…
Reference in a new issue