home: mpv: use mpvScripts.modernx

This commit is contained in:
Guanran Wang 2024-01-16 11:31:36 +08:00
parent 698b5d49b5
commit 85d1debfee
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8

View file

@ -1,6 +1,7 @@
{ {
pkgs, pkgs,
lib, lib,
inputs,
... ...
}: { }: {
programs.mpv = { programs.mpv = {
@ -13,26 +14,21 @@
profile = "gpu-hq"; profile = "gpu-hq";
osc = "no"; osc = "no";
}; };
scripts = with pkgs.mpvScripts; scripts =
[ (with pkgs.mpvScripts; [
thumbfast thumbfast
] ])
++ (with inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.mpvScripts; [
modernx
])
++ lib.optionals (!pkgs.stdenv.hostPlatform.isDarwin) (with pkgs.mpvScripts; [ ++ lib.optionals (!pkgs.stdenv.hostPlatform.isDarwin) (with pkgs.mpvScripts; [
mpris mpris
]); ]);
}; };
# for scripts that is not in nixpkgs # I dont know how to handle the font
xdg.configFile = let xdg.configFile = with inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.mpvScripts; {
modernX = pkgs.fetchFromGitHub { "mpv/fonts/Material-Design-Iconic-Font.ttf".source = "${modernx}/share/mpv/fonts/Material-Design-Iconic-Font.ttf";
owner = "zydezu"; "mpv/fonts/Material-Design-Iconic-Round.ttf".source = "${modernx}/share/mpv/fonts/Material-Design-Iconic-Round.ttf";
repo = "modernX";
rev = "10f74d29f86cbfb307181ecfa564402f993b073d";
hash = "sha256-ozbOsVGdllB+E4UtERynhe5Eng3nKnL/IIEtT4yVdOI=";
};
in {
"mpv/scripts/modernx.lua".source = "${modernX}/modernx.lua";
"mpv/fonts/Material-Design-Iconic-Font.ttf".source = "${modernX}/Material-Design-Iconic-Font.ttf";
"mpv/fonts/Material-Design-Iconic-Round.ttf".source = "${modernX}/Material-Design-Iconic-Round.ttf";
}; };
} }