File tree Expand file tree Collapse file tree 4 files changed +59
-0
lines changed Expand file tree Collapse file tree 4 files changed +59
-0
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
inputs = {
3
3
nixpkgs . url = "github:NixOS/nixpkgs/nixos-24.11" ;
4
+ nixpkgs-unstable . url = "github:NixOS/nixpkgs/nixos-unstable" ;
4
5
deploy-sh . url = "github:Defelo/deploy-sh" ;
5
6
sops-nix . url = "github:Mic92/sops-nix" ;
6
7
nfnix . url = "github:Defelo/nfnix" ;
Original file line number Diff line number Diff line change 10
10
./nginx.nix
11
11
./restic.nix
12
12
./wireguard.nix
13
+ ./youtube-downloads.nix
13
14
] ;
14
15
15
16
filesystems . defaultLayout = true ;
Original file line number Diff line number Diff line change
1
+ { nixpkgs-unstable , ...} : {
2
+ imports = [ "${ nixpkgs-unstable } /nixos/modules/services/misc/ytdl-sub.nix" ] ;
3
+
4
+ services . sshfs . mounts . "/mnt/youtube" = {
5
+ host = "u381435.your-storagebox.de" ;
6
+ port = 23 ;
7
+ user = "u381435" ;
8
+ path = "youtube" ;
9
+ readOnly = false ;
10
+ allowOther = true ;
11
+ } ;
12
+
13
+ services . ytdl-sub . instances . default = {
14
+ enable = true ;
15
+ schedule = null ; # TODO
16
+
17
+ config = {
18
+ presets . "YouTube Playlist" = {
19
+ preset = [ "Max 480p" ] ; # TODO
20
+ download = "{subscription_value}" ;
21
+ output_options = {
22
+ output_directory = "/mnt/youtube" ;
23
+ file_name = "{subscription_name}/{playlist_index_padded}_{%sanitize(title)}.{ext}" ;
24
+ maintain_download_archive = true ;
25
+ } ;
26
+ ytdl_options = {
27
+ cookiefile = "/var/lib/ytdl-sub/default/.cookies" ;
28
+ } ;
29
+ } ;
30
+ } ;
31
+
32
+ subscriptions . "YouTube Playlist" = {
33
+ rust = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7r4HuTyVCDLKlsD9EQzoncP" ;
34
+ quantencomputer = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7qS21FP5tk1QqmeAmd2hpQF" ;
35
+ clean_code = "https://www.youtube.com/playlist?list=PLNmsVeXQZj7ryyZikMDPxxyYxEKtKn0ji" ;
36
+ } ;
37
+ } ;
38
+
39
+ systemd . services . ytdl-sub-default . serviceConfig . ReadWritePaths = [ "/mnt/youtube" ] ;
40
+ }
You can’t perform that action at this time.
0 commit comments