Skip to content

Commit 5a73df3

Browse files
committed
add ytdl-sub
1 parent a9ed3d3 commit 5a73df3

File tree

2 files changed

+148
-0
lines changed

2 files changed

+148
-0
lines changed

hosts/prod/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
./nginx.nix
1414
./restic.nix
1515
./wireguard.nix
16+
./youtube-downloads.nix
1617
];
1718

1819
filesystems.defaultLayout = true;

hosts/prod/youtube-downloads.nix

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
{
2+
services.sshfs.mounts."/mnt/youtube" = {
3+
host = "u381435.your-storagebox.de";
4+
port = 23;
5+
user = "u381435";
6+
path = "youtube";
7+
readOnly = false;
8+
allowOther = true;
9+
};
10+
11+
services.ytdl-sub.instances.default = {
12+
enable = true;
13+
schedule = "3/8:17";
14+
15+
config = {
16+
presets."YouTube Playlist" =
17+
let
18+
base_name = "{subscription_name}/{playlist_index_padded}_{uid}_{%sanitize(title)}";
19+
in
20+
{
21+
preset = [
22+
"Best Video Quality"
23+
"Chunk Downloads"
24+
];
25+
download = "{subscription_value}";
26+
output_options = {
27+
output_directory = "/mnt/youtube";
28+
file_name = "${base_name}.{ext}";
29+
maintain_download_archive = true;
30+
};
31+
chapters = {
32+
embed_chapters = true;
33+
sponsorblock_categories = "all";
34+
remove_sponsorblock_categories = [
35+
"sponsor"
36+
"selfpromo"
37+
"interaction"
38+
];
39+
};
40+
embed_thumbnail = true;
41+
subtitles = {
42+
subtitles_name = "${base_name}.{lang}.{subtitles_ext}";
43+
subtitles_type = "vtt";
44+
embed_subtitles = true;
45+
allow_auto_generated_subtitles = true;
46+
languages = [
47+
"en"
48+
"de"
49+
];
50+
};
51+
ytdl_options = {
52+
cookiefile = "/var/lib/ytdl-sub/default/.cookies";
53+
};
54+
overrides = {
55+
chunk_max_downloads = 200;
56+
};
57+
};
58+
};
59+
60+
subscriptions."YouTube Playlist" = {
61+
algorithmen_und_datenstrukturen = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7q2hZHyLJS6IeHQIlyEgKqf";
62+
angular_5 = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7pY65LXhI1_bIcOByRhP9Xb";
63+
anonymitaet_im_internet = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7on8Ckrk2wo4ySeenf3rgf0";
64+
assembler = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7rhjy2t320NvKKGwP6Rxnpg";
65+
bash = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7r-Tw-cNntRgvwA7nXPAjP4";
66+
binaere_mathematik = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7rsjQsc8hFAdR4BlO_MQib1";
67+
binary_exploitation_secure_coding = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7qff-bnM05OqSI0fx4GknZ6";
68+
bitcoin_blockchain_kryptowaehrungen = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7oiW2UVh1Go8JgllRbZRcPK";
69+
clean_code = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7ryyZikMDPxxyYxEKtKn0ji";
70+
cloud = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7oxg9u5X2a-9X_jpN8iPOQy";
71+
cpp = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7oG-kkn36ZnDpRq6iahUXZS";
72+
c_sharp = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7rlNexPh8wjI2DyABX8It7U";
73+
css3_fuer_anfaenger = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7qQz698kYRkkBXJDeXJY_I7";
74+
c = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7q4shI4L__SRpetWff9BjLZ";
75+
dart_flutter = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7qokXX4II7FCZthJcrirT4o";
76+
data_mining = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7qIOuGJrd-lu-ZZc9t4EdwM";
77+
datenvisualisierung = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7pb4apqIMKvCz37t_dLznMm";
78+
devops_grundlagen = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7pSbRnMtEG5XEdYVwJE5se9";
79+
docker = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7oea6IDCLzpKe5XfLmWCwgr";
80+
firewalls = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7oAAFVjNrAz1uRqIcanXreg";
81+
ghidra_reverse_engineering = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7oQc3MxjWB-rYHHo9vX905a";
82+
git_und_github = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7rbmmqb1Lt_RGU4DEhelTrR";
83+
graphentheorie = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7q2hZHyLJS6IeHQIlyEgKqf";
84+
haskell = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7pFIXDN1NLw6jMExuK-wN8I";
85+
html5_fuer_anfaenger = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7qIbKPeroqn3-BkUTWzYBT4";
86+
iam = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7rBqyMDGlv4LZmNrq1gChjh";
87+
it_sicherheit_hacken_essentials = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7oVGaVtkLlu3jYl_D8ugxeT";
88+
java_algorithmen = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7o4qcD8tepVY5k7YiHYfMu5";
89+
java_fortgeschrittene_techniken = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7oirQMpjPjrmNx4vcVIGIGY";
90+
java_ray_tracing = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7rvhHip_LTM-J-5wHw7dWnw";
91+
javascript_express = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7ogA_q-mOoYH3dDQIh8B3Oe";
92+
javascript_jest = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7qgQ2jnCFTo_knQTbpU5W4X";
93+
javascript = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7qOfMI2ZNk-LXUAiXKrwDIi";
94+
java_swing = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7o5ALam15-pQWtf22RgU6D7";
95+
java = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7qI9vtiiU5bJBfbxqBailVM";
96+
jquery = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7qbE13388pQpsXQkpRQ96sM";
97+
kotlin_fortgeschrittene_techniken = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7rylgyThgUldHG8KE6Nbc1O";
98+
kotlin = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7rylgyThgUldHG8KE6Nbc1O";
99+
kryptographie = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7pWwFv5APk240hrehtCJae-";
100+
lambda_kalkuel = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7oBz3PP5sGIkLnmBbw10UUP";
101+
latex = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7phxF5hBRWNJx9-KtIHjVYv";
102+
linux_autokey = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7qCtvw6fiki0ihkwv7tIWN_";
103+
linux_distributionen = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7o15uBS2J9Ryz-pM-P9xcWJ";
104+
linux_gnupg = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7pUKpzMbzggvudByxULkut-";
105+
linux = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7oaopPUB0SEmzZLf3aE5msy";
106+
llms = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7r4pg1j8eFsEQp3nL0w4jJz";
107+
logik = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7r7ztDWJ66pMNRYaa_TUjKP";
108+
machine_learning = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7qoIUw0MBYQ9qJffZAVdRWC";
109+
medienkompetenz = "https://www.youtube.com/playlist?list=PL6RbeNL8jYDees12cwPupr49wMArrVQEX";
110+
mengenlehre = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7q_xBcMAlQ2K18HjMpAe0Nm";
111+
netzsicherheit = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7ovwsL-PKfByCX-jGuZAopM";
112+
netzwerktechnik = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7rjW6OL4aGL-L1SzBUijh8r";
113+
nodejs = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7o-5JThNbEVW6CGAhWJwnkA";
114+
php_fuer_anfaenger = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7rZMP1lj32Qyp4bkarvzCGm";
115+
programmieren_lernen = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7onyAB57T0xqV2ZVSZOo79a";
116+
prolog = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7q7ODiEAnq2EnsP-8LMGtfw";
117+
python_data_science = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7o46LI06XkxAqcg4Ucm7pwn";
118+
python_flask = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7otfP2zTa8AIiNIWVg0BRqs";
119+
python_lets_code = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7p09TLbRQmqzbH81DHjBO8E";
120+
python_pillow = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7p6tJ5S5Yvbw3reoZcHdyfR";
121+
python_pyqt = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7ruNQIfS8NRpjzZIRq0A8QP";
122+
python_pytorch = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7rx55Mai21reZtd_8m-qe27";
123+
python_selenium = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7ruEf-FwVD3Z5owHgdXNKlb";
124+
python_tensorflow = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7oj8ijyHSTOoW9bHLlXQ7hp";
125+
python = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7q0ao69AIogD94oBgp3E9Zs";
126+
react_js = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7oi_Q4whC28Yp12l1I-hauk";
127+
sass_scss = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7oopYYGy5hX-Y6b07_3DPp5";
128+
serveradministration = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7orIal3z8bq8HlHxnN-CtXr";
129+
signalverarbeitung = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7qvLZlbEiRwHoP0mbmAHNId";
130+
softskills = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7rC5g_bZNxZF6lOjSfNBKkE";
131+
softwareengineering = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7qNMn6zimfu4JPUklG-4Uu4";
132+
spark_pyspark = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7pkk8-Yxa7mjAqi_E9DE_Z9";
133+
sql_und_datenbanken = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7qYPusTRflv3tkzhYoT-KiB";
134+
threejs = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7rrmmZEVGA4GfLLNLlGipWo";
135+
typescript = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7pwHqtQSBXGBUNkyGGOJQXf";
136+
uml = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7oC7U6tm0BOnGg1R9ont0Vo";
137+
unreal_engine = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7olLCliQ05e6hvEOl6sbBgv";
138+
windows10 = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7rRSgXNzZMV3XlrfklBugNW";
139+
wireshark = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7oIlWv3K9xACZi3fHfYLKtj";
140+
141+
# TODO
142+
# lustige_web_ui_effekte = "";
143+
};
144+
};
145+
146+
systemd.services.ytdl-sub-default.serviceConfig.ReadWritePaths = [ "/mnt/youtube" ];
147+
}

0 commit comments

Comments
 (0)