summaryrefslogtreecommitdiff
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
parent7e7656e22ced47bec5ea5bae1da08e3ef48d2e42 (diff)
downloadnixos-dce843e98018baffd6a7d2d157d3362d1395fb0f.tar
nixos-dce843e98018baffd6a7d2d157d3362d1395fb0f.tar.gz
nixos-dce843e98018baffd6a7d2d157d3362d1395fb0f.tar.bz2
nixos-dce843e98018baffd6a7d2d157d3362d1395fb0f.tar.xz
nixos-dce843e98018baffd6a7d2d157d3362d1395fb0f.zip
...
-rw-r--r--_sources/generated.json33
-rw-r--r--_sources/generated.nix27
-rw-r--r--accounts/gkleen@sif/ssh-hosts.nix5
-rw-r--r--nvfetcher.toml6
-rw-r--r--user-profiles/mpv/default.nix211
-rw-r--r--user-profiles/yt-dlp.nix34
6 files changed, 188 insertions, 128 deletions
diff --git a/_sources/generated.json b/_sources/generated.json
index 3419a35d..21d06f3d 100644
--- a/_sources/generated.json
+++ b/_sources/generated.json
@@ -21,7 +21,7 @@
21 }, 21 },
22 "bpf-examples": { 22 "bpf-examples": {
23 "cargoLocks": null, 23 "cargoLocks": null,
24 "date": "2023-02-03", 24 "date": "2023-03-22",
25 "extract": null, 25 "extract": null,
26 "name": "bpf-examples", 26 "name": "bpf-examples",
27 "passthru": null, 27 "passthru": null,
@@ -33,11 +33,11 @@
33 "name": null, 33 "name": null,
34 "owner": "xdp-project", 34 "owner": "xdp-project",
35 "repo": "bpf-examples", 35 "repo": "bpf-examples",
36 "rev": "f27b9881bf04493a5d0a32d0f56f2b88d72ba63f", 36 "rev": "91f2e1528a39ba15450cd7b6ef1cf550f3da5af8",
37 "sha256": "sha256-Ikwgds8Nd+rKMP6ckECChpPgIIBgfhuaUug4uJKDX8U=", 37 "sha256": "sha256-0AxmHHeRarUQwaTR83sf0Nip/7XVdIeeMWM4DGc/ESo=",
38 "type": "github" 38 "type": "github"
39 }, 39 },
40 "version": "f27b9881bf04493a5d0a32d0f56f2b88d72ba63f" 40 "version": "91f2e1528a39ba15450cd7b6ef1cf550f3da5af8"
41 }, 41 },
42 "emacs-scratch_el": { 42 "emacs-scratch_el": {
43 "cargoLocks": null, 43 "cargoLocks": null,
@@ -212,6 +212,25 @@
212 }, 212 },
213 "version": "5d2fb7ab73fc0e36d44109e75c9be26bd42084e2" 213 "version": "5d2fb7ab73fc0e36d44109e75c9be26bd42084e2"
214 }, 214 },
215 "mpv-youtube-quality": {
216 "cargoLocks": null,
217 "date": "2020-02-10",
218 "extract": null,
219 "name": "mpv-youtube-quality",
220 "passthru": null,
221 "pinned": false,
222 "src": {
223 "deepClone": false,
224 "fetchSubmodules": false,
225 "leaveDotGit": false,
226 "name": null,
227 "rev": "1f8c31457459ffc28cd1c3f3c2235a53efad7148",
228 "sha256": "sha256-voNP8tCwCv8QnAZOPC9gqHRV/7jgCAE63VKBd/1s5ic=",
229 "type": "git",
230 "url": "https://github.com/jgreco/mpv-youtube-quality"
231 },
232 "version": "1f8c31457459ffc28cd1c3f3c2235a53efad7148"
233 },
215 "postfix-mta-sts-resolver": { 234 "postfix-mta-sts-resolver": {
216 "cargoLocks": null, 235 "cargoLocks": null,
217 "date": null, 236 "date": null,
@@ -221,11 +240,11 @@
221 "pinned": false, 240 "pinned": false,
222 "src": { 241 "src": {
223 "name": null, 242 "name": null,
224 "sha256": "sha256-zO/DTAkJYnSiZFKloxTKmYgNHYGznaHyah71wgi9f44=", 243 "sha256": "sha256-j6ExzNxtY5wHSDtw+zeuGy3Go3yLvIV+9bYBxlPCIYo=",
225 "type": "url", 244 "type": "url",
226 "url": "https://github.com/Snawoot/postfix-mta-sts-resolver/archive/refs/tags/v1.2.0.tar.gz" 245 "url": "https://github.com/Snawoot/postfix-mta-sts-resolver/archive/refs/tags/v1.3.0.tar.gz"
227 }, 246 },
228 "version": "1.2.0" 247 "version": "1.3.0"
229 }, 248 },
230 "postfwd": { 249 "postfwd": {
231 "cargoLocks": null, 250 "cargoLocks": null,
diff --git a/_sources/generated.nix b/_sources/generated.nix
index 23906a49..19a65aa6 100644
--- a/_sources/generated.nix
+++ b/_sources/generated.nix
@@ -17,15 +17,15 @@
17 }; 17 };
18 bpf-examples = { 18 bpf-examples = {
19 pname = "bpf-examples"; 19 pname = "bpf-examples";
20 version = "f27b9881bf04493a5d0a32d0f56f2b88d72ba63f"; 20 version = "91f2e1528a39ba15450cd7b6ef1cf550f3da5af8";
21 src = fetchFromGitHub ({ 21 src = fetchFromGitHub ({
22 owner = "xdp-project"; 22 owner = "xdp-project";
23 repo = "bpf-examples"; 23 repo = "bpf-examples";
24 rev = "f27b9881bf04493a5d0a32d0f56f2b88d72ba63f"; 24 rev = "91f2e1528a39ba15450cd7b6ef1cf550f3da5af8";
25 fetchSubmodules = true; 25 fetchSubmodules = true;
26 sha256 = "sha256-Ikwgds8Nd+rKMP6ckECChpPgIIBgfhuaUug4uJKDX8U="; 26 sha256 = "sha256-0AxmHHeRarUQwaTR83sf0Nip/7XVdIeeMWM4DGc/ESo=";
27 }); 27 });
28 date = "2023-02-03"; 28 date = "2023-03-22";
29 }; 29 };
30 emacs-scratch_el = { 30 emacs-scratch_el = {
31 pname = "emacs-scratch_el"; 31 pname = "emacs-scratch_el";
@@ -132,12 +132,25 @@
132 }; 132 };
133 date = "2023-02-22"; 133 date = "2023-02-22";
134 }; 134 };
135 mpv-youtube-quality = {
136 pname = "mpv-youtube-quality";
137 version = "1f8c31457459ffc28cd1c3f3c2235a53efad7148";
138 src = fetchgit {
139 url = "https://github.com/jgreco/mpv-youtube-quality";
140 rev = "1f8c31457459ffc28cd1c3f3c2235a53efad7148";
141 fetchSubmodules = false;
142 deepClone = false;
143 leaveDotGit = false;
144 sha256 = "sha256-voNP8tCwCv8QnAZOPC9gqHRV/7jgCAE63VKBd/1s5ic=";
145 };
146 date = "2020-02-10";
147 };
135 postfix-mta-sts-resolver = { 148 postfix-mta-sts-resolver = {
136 pname = "postfix-mta-sts-resolver"; 149 pname = "postfix-mta-sts-resolver";
137 version = "1.2.0"; 150 version = "1.3.0";
138 src = fetchurl { 151 src = fetchurl {
139 url = "https://github.com/Snawoot/postfix-mta-sts-resolver/archive/refs/tags/v1.2.0.tar.gz"; 152 url = "https://github.com/Snawoot/postfix-mta-sts-resolver/archive/refs/tags/v1.3.0.tar.gz";
140 sha256 = "sha256-zO/DTAkJYnSiZFKloxTKmYgNHYGznaHyah71wgi9f44="; 153 sha256 = "sha256-j6ExzNxtY5wHSDtw+zeuGy3Go3yLvIV+9bYBxlPCIYo=";
141 }; 154 };
142 }; 155 };
143 postfwd = { 156 postfwd = {
diff --git a/accounts/gkleen@sif/ssh-hosts.nix b/accounts/gkleen@sif/ssh-hosts.nix
index 3e3ac025..edfe46a0 100644
--- a/accounts/gkleen@sif/ssh-hosts.nix
+++ b/accounts/gkleen@sif/ssh-hosts.nix
@@ -499,4 +499,9 @@
499 } 499 }
500 ]; 500 ];
501 }; 501 };
502 "col-crpd01" =
503 { hostname = "col-crpd01.mathinst.loc";
504 proxyJump = "mgmt01";
505 user = "root";
506 };
502} 507}
diff --git a/nvfetcher.toml b/nvfetcher.toml
index 54a3292d..c109e06a 100644
--- a/nvfetcher.toml
+++ b/nvfetcher.toml
@@ -82,4 +82,8 @@ fetch.url = "https://github.com/hansmi/prometheus-lvm-exporter/archive/refs/tags
82[bpf-examples] 82[bpf-examples]
83src.git = "https://github.com/xdp-project/bpf-examples" 83src.git = "https://github.com/xdp-project/bpf-examples"
84fetch.github = "xdp-project/bpf-examples" 84fetch.github = "xdp-project/bpf-examples"
85git.fetchSubmodules = true \ No newline at end of file 85git.fetchSubmodules = true
86
87[mpv-youtube-quality]
88src.git = "https://github.com/jgreco/mpv-youtube-quality"
89fetch.git = "https://github.com/jgreco/mpv-youtube-quality"
diff --git a/user-profiles/mpv/default.nix b/user-profiles/mpv/default.nix
index 9c9d077b..908a4de3 100644
--- a/user-profiles/mpv/default.nix
+++ b/user-profiles/mpv/default.nix
@@ -1,108 +1,125 @@
1{ config, lib, userName, pkgs, sources, ... }: 1{ config, lib, userName, pkgs, sources, ... }:
2{ 2{
3 home-manager.users.${userName}.programs.mpv = { 3 home-manager.users.${userName} = {
4 enable = true; 4 programs.mpv = {
5 bindings = { 5 enable = true;
6 # "CTRL+n" = "af toggle \"lavfi=[dynaudnorm=f=100:g=31:s=20.0]\""; 6 bindings = {
7 }; 7 # "CTRL+n" = "af toggle \"lavfi=[dynaudnorm=f=100:g=31:s=20.0]\"";
8 config = { 8 };
9 ytdl = true; 9 config = {
10 subs-with-matching-audio = false; 10 ytdl = true;
11 audio-display = false; 11 subs-with-matching-audio = false;
12 osd-font = "Fira Sans"; 12 audio-display = false;
13 sub-font = "Fira Sans"; 13 osd-font = "Fira Sans";
14 # vo = "gpu"; 14 sub-font = "Fira Sans";
15 hwdec = "auto"; 15 # vo = "gpu";
16 force-window = "yes"; 16 hwdec = "auto";
17 # af = "lavfi=[dynaudnorm=f=100:g=31:s=20.0]"; 17 force-window = "yes";
18 script-opts = lib.concatStringsSep "," [ 18 # af = "lavfi=[dynaudnorm=f=100:g=31:s=20.0]";
19 "osc-layout=topbar" 19 script-opts = lib.concatStringsSep "," [
20 "vidscale=no" 20 "osc-layout=topbar"
21 "deadzonesize=0.9" 21 "vidscale=no"
22 "ytdl_hook-ytdl_path=${pkgs.yt-dlp}/bin/yt-dlp" 22 "deadzonesize=0.9"
23 "chapterskip-skip=sponsor;intro;endcard;interact" 23 "ytdl_hook-ytdl_path=${pkgs.yt-dlp}/bin/yt-dlp"
24 "chapterskip-categories=sponsor>%[SponsorBlock%]: .*Sponsor.*;intro>%[SponsorBlock%]: .*Intro Animation.*;endcard>%[SponsorBlock%]: .*Endcards.*;interact>%[SponsorBlock%]: .*Interaction Reminder.*" 24 "chapterskip-skip=sponsor;intro;endcard;interact"
25 "sub_select-config=${pkgs.writeTextDir "sub-select.json" (builtins.toJSON [ 25 "chapterskip-categories=sponsor>%[SponsorBlock%]: .*Sponsor.*;intro>%[SponsorBlock%]: .*Intro Animation.*;endcard>%[SponsorBlock%]: .*Endcards.*;interact>%[SponsorBlock%]: .*Interaction Reminder.*"
26 { 26 "sub_select-config=${pkgs.writeTextDir "sub-select.json" (builtins.toJSON [
27 alang = "*"; 27 {
28 slang = "forced"; 28 alang = "*";
29 } 29 slang = "forced";
30 { 30 }
31 alang = ["jpn" "ja"]; 31 {
32 slang = "eng?"; 32 alang = ["jpn" "ja"];
33 blacklist = [ "sign" ]; 33 slang = "eng?";
34 } 34 blacklist = [ "sign" ];
35 { 35 }
36 alang = ["jpn" "ja"]; 36 {
37 slang = "und"; 37 alang = ["jpn" "ja"];
38 blacklist = [ "sign" ]; 38 slang = "und";
39 } 39 blacklist = [ "sign" ];
40 { 40 }
41 alang = ["eng?" "deu?"]; 41 {
42 slang = "no"; 42 alang = ["eng?" "deu?"];
43 } 43 slang = "no";
44 { 44 }
45 alang = "*"; 45 {
46 slang = "eng?"; 46 alang = "*";
47 } 47 slang = "eng?";
48 { 48 }
49 alang = "*"; 49 {
50 slang = "und"; 50 alang = "*";
51 } 51 slang = "und";
52 ])}" 52 }
53 ]; 53 ])}"
54 }; 54 ];
55 scripts = [ 55 };
56 (pkgs.stdenv.mkDerivation (sources.mpv-reload // rec { 56 scripts = [
57 installPhase = '' 57 (pkgs.stdenv.mkDerivation (sources.mpv-reload // rec {
58 install -d $out/share/mpv/scripts 58 installPhase = ''
59 install -m 0644 reload.lua $out/share/mpv/scripts/${passthru.scriptName} 59 install -d $out/share/mpv/scripts
60 ''; 60 install -m 0644 reload.lua $out/share/mpv/scripts/${passthru.scriptName}
61 '';
62
63 passthru.scriptName = "reload.lua";
64 }))
65 (pkgs.stdenv.mkDerivation (sources.mpv-createchapter // rec {
66 installPhase = ''
67 install -d $out/share/mpv/scripts
68 install -m 0644 createchapter.lua $out/share/mpv/scripts/${passthru.scriptName}
69 '';
61 70
62 passthru.scriptName = "reload.lua"; 71 passthru.scriptName = "createchapter.lua";
63 })) 72 }))
64 (pkgs.stdenv.mkDerivation (sources.mpv-createchapter // rec { 73 (pkgs.stdenv.mkDerivation (sources.mpv-autosave // rec {
65 installPhase = '' 74 installPhase = ''
66 install -d $out/share/mpv/scripts 75 install -d $out/share/mpv/scripts
67 install -m 0644 createchapter.lua $out/share/mpv/scripts/${passthru.scriptName} 76 install -m 0644 autosave.lua $out/share/mpv/scripts/${passthru.scriptName}
68 ''; 77 '';
69 78
70 passthru.scriptName = "createchapter.lua"; 79 passthru.scriptName = "autosave.lua";
71 })) 80 }))
72 (pkgs.stdenv.mkDerivation (sources.mpv-autosave // rec { 81 (pkgs.stdenv.mkDerivation (sources.mpv-mpris // rec {
73 installPhase = '' 82 installPhase = ''
74 install -d $out/share/mpv/scripts 83 install -d $out/share/mpv/scripts
75 install -m 0644 autosave.lua $out/share/mpv/scripts/${passthru.scriptName} 84 install -m 0644 mpris.so $out/share/mpv/scripts/${passthru.scriptName}
76 ''; 85 '';
77 86
78 passthru.scriptName = "autosave.lua"; 87 nativeBuildInputs = with pkgs; [ pkg-config glib mpv ];
79 }))
80 (pkgs.stdenv.mkDerivation (sources.mpv-mpris // rec {
81 installPhase = ''
82 install -d $out/share/mpv/scripts
83 install -m 0644 mpris.so $out/share/mpv/scripts/${passthru.scriptName}
84 '';
85 88
86 nativeBuildInputs = with pkgs; [ pkg-config glib mpv ]; 89 passthru.scriptName = "mpris.so";
90 }))
91 (pkgs.stdenv.mkDerivation (sources.mpv-chapterskip // rec {
92 installPhase = ''
93 install -d $out/share/mpv/scripts
94 install -m 0644 chapterskip.lua $out/share/mpv/scripts/${passthru.scriptName}
95 '';
87 96
88 passthru.scriptName = "mpris.so"; 97 passthru.scriptName = "chapterskip.lua";
89 })) 98 }))
90 (pkgs.stdenv.mkDerivation (sources.mpv-chapterskip // rec { 99 (pkgs.stdenv.mkDerivation (sources.mpv-subselect // rec {
91 installPhase = '' 100 installPhase = ''
92 install -d $out/share/mpv/scripts 101 install -d $out/share/mpv/scripts
93 install -m 0644 chapterskip.lua $out/share/mpv/scripts/${passthru.scriptName} 102 install -m 0644 sub-select.lua $out/share/mpv/scripts/${passthru.scriptName}
94 ''; 103 '';
95 104
96 passthru.scriptName = "chapterskip.lua"; 105 passthru.scriptName = "sub-select.lua";
97 })) 106 }))
98 (pkgs.stdenv.mkDerivation (sources.mpv-subselect // rec { 107 (pkgs.stdenv.mkDerivation (sources.mpv-youtube-quality // rec {
99 installPhase = '' 108 patches = [
100 install -d $out/share/mpv/scripts 109 (pkgs.fetchpatch { url = "https://github.com/jgreco/mpv-youtube-quality/pull/31.patch"; hash = "sha256-2aTTkW48uRe8XC1ZQ8J5T9sUmZ5F3YAoYCMxqEs2AY8="; })
101 install -m 0644 sub-select.lua $out/share/mpv/scripts/${passthru.scriptName} 110 (pkgs.fetchpatch { url = "https://github.com/jgreco/mpv-youtube-quality/pull/20.patch"; hash = "sha256-X5BwDsxziYbeiQvrBt8+IS+6oH1i0LvaaYtugL790gg="; })
102 ''; 111 ];
112
113 installPhase = ''
114 install -d $out/share/mpv/scripts
115 install -m 0644 youtube-quality.lua $out/share/mpv/scripts/${passthru.scriptName}
116 '';
117
118 passthru.scriptName = "youtube-quality.lua";
119 }))
120 ];
121 };
103 122
104 passthru.scriptName = "sub-select.lua"; 123 xdg.configFile."mpv/youtube-dl".source = "${pkgs.yt-dlp}/bin/yt-dlp";
105 }))
106 ];
107 }; 124 };
108} 125}
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}