summaryrefslogtreecommitdiff
path: root/hm/soft/mpv.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hm/soft/mpv.nix')
-rw-r--r--hm/soft/mpv.nix63
1 files changed, 63 insertions, 0 deletions
diff --git a/hm/soft/mpv.nix b/hm/soft/mpv.nix
new file mode 100644
index 0000000..8df73e7
--- /dev/null
+++ b/hm/soft/mpv.nix
@@ -0,0 +1,63 @@
+{ config, lib, pkgs, ... }:
+let
+ cfg = config.hm.soft.mpv;
+ shim_dir = "${pkgs.mpv-shim-default-shaders}/share/mpv-shim-default-shaders/shaders";
+ anime4k_dir = "${pkgs.anime4k}"
+in
+{
+ options.hm.soft.mpv.enable = lib.mkEnableOption "mpv media player";
+ config = lib.mkIf cfg.enable {
+ home.packages = with pkgs; [
+ anime4k
+ mpv-shim-default-shaders
+ ];
+ programs.mpv = {
+ enable = true;
+ config = {
+ # general stuff
+ save-position-on-quit = true;
+ keep-open = "yes";
+
+ # video
+ profile = "gpu-hq";
+ gpu-api = "vulkan";
+ vo = "gpu-next";
+ hwdec = "auto";
+
+ # audio
+ ao = "pipewire";
+ sub-auto = "fuzzy";
+ volume-max = "200";
+
+ # network streaming
+ demuxer-max-back-bytes = "50Mib";
+ demuxer-max-bytes = "600Mib";
+ demuxer-readahead-secs = 300;
+ force-seekable = "yes";
+
+ # screenshotting
+ screenshot-format = "png";
+ screenshot-directory = "~/${config.hm.conf.xdg-dirs.mediaPath}/pics/ss";
+ screenshot-template = "mpv-%f-%wH.%wM.%wS-#%#00n";
+ };
+ scripts = with pkgs.mpvScripts; [
+ webtorrent-mpv-hook
+ visualizer
+ videoclip
+ thumbfast
+ reload
+ mpv-subtitle-lines
+ mpv-notify-send
+ mpv-cheatsheet
+ modernx
+ memo
+ autosubsync-mpv
+ autosub
+ ];
+ };
+ hm.soft = {
+ media.enable = true;
+ yt-dlp.enable = true;
+ };
+ };
+}