flake/users/guanranwang/home-manager/applications/mpv/default.nix

36 lines
920 B
Nix
Raw Normal View History

2023-12-13 11:02:11 +00:00
{
pkgs,
lib,
2024-01-16 03:31:36 +00:00
inputs,
2023-12-13 11:02:11 +00:00
...
}: {
2023-12-12 18:53:45 +00:00
programs.mpv = {
enable = true;
config = {
2023-12-14 08:07:54 +00:00
ao = "pipewire,";
vo = "gpu-next,gpu,";
2023-12-12 18:53:45 +00:00
hwdec = "auto-safe";
profile = "gpu-hq";
osc = "no";
};
2024-01-16 03:31:36 +00:00
scripts =
(with pkgs.mpvScripts; [
2023-12-13 11:02:11 +00:00
thumbfast
2024-01-16 04:04:27 +00:00
sponsorblock
2024-01-16 03:31:36 +00:00
])
++ (with inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.mpvScripts; [
modernx
])
2023-12-14 08:07:54 +00:00
++ lib.optionals (!pkgs.stdenv.hostPlatform.isDarwin) (with pkgs.mpvScripts; [
mpris
]);
2023-12-12 18:53:45 +00:00
};
2024-01-16 03:31:36 +00:00
# I dont know how to handle the font
xdg.configFile = with inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.mpvScripts; {
"mpv/fonts/Material-Design-Iconic-Font.ttf".source = "${modernx}/share/mpv/fonts/Material-Design-Iconic-Font.ttf";
"mpv/fonts/Material-Design-Iconic-Round.ttf".source = "${modernx}/share/mpv/fonts/Material-Design-Iconic-Round.ttf";
2023-12-12 18:53:45 +00:00
};
2023-11-28 05:40:22 +00:00
}