summaryrefslogtreecommitdiff
path: root/user-profiles/yt-dlp.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2023-04-04 10:23:25 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2023-04-04 10:23:25 +0200
commitdce843e98018baffd6a7d2d157d3362d1395fb0f (patch)
tree7a804575f080beed64fe4746666583461c5f0dc1 /user-profiles/yt-dlp.nix
parent7e7656e22ced47bec5ea5bae1da08e3ef48d2e42 (diff)
downloadnixos-dce843e98018baffd6a7d2d157d3362d1395fb0f.tar
nixos-dce843e98018baffd6a7d2d157d3362d1395fb0f.tar.gz
nixos-dce843e98018baffd6a7d2d157d3362d1395fb0f.tar.bz2
nixos-dce843e98018baffd6a7d2d157d3362d1395fb0f.tar.xz
nixos-dce843e98018baffd6a7d2d157d3362d1395fb0f.zip
...
Diffstat (limited to 'user-profiles/yt-dlp.nix')
-rw-r--r--user-profiles/yt-dlp.nix34
1 files changed, 18 insertions, 16 deletions
diff --git a/user-profiles/yt-dlp.nix b/user-profiles/yt-dlp.nix
index 0af42786..1a30ab5a 100644
--- a/user-profiles/yt-dlp.nix
+++ b/user-profiles/yt-dlp.nix
@@ -1,21 +1,23 @@
1{ config, lib, userName, pkgs, ... }: 1{ config, lib, userName, pkgs, ... }:
2{ 2{
3 home-manager.users.${userName} = { 3 home-manager.users.${userName} = {
4 home.packages = with pkgs; [ yt-dlp ]; 4 programs.yt-dlp = {
5 xdg.configFile."yt-dlp/config".text = '' 5 enable = true;
6 --cookies-from-browser firefox 6 settings = {
7 --mark-watched 7 cookies-from-browser = "firefox";
8 --format ${lib.concatStringsSep "/" [ 8 mark-watched = true;
9 "bestvideo[width<=3840][height<=2160][fps<=60]+bestaudio" 9 format = lib.concatStringsSep "/" [
10 "best[width<=3840][height<=2160][fps<=60]" 10 "bestvideo[width<=3840][height<=2160][fps<=60]+bestaudio"
11 "best" 11 "best[width<=3840][height<=2160][fps<=60]"
12 ]} 12 "best"
13 --sub-langs all,-live_chat 13 ];
14 --prefer-free-formats 14 sub-langs = "all,-live_chat,-rechat";
15 --embed-metadata 15 prefer-free-formats = true;
16 --downloader ${pkgs.aria2}/bin/aria2c 16 embed-metadata = true;
17 --sponsorblock-mark all 17 downloader = "${pkgs.aria2}/bin/aria2c";
18 --restrict-filenames 18 sponsorblock-mark = "all";
19 ''; 19 restrict-filenames = true;
20 };
21 };
20 }; 22 };
21} 23}