about summary refs log tree commit diff
path: root/home/mpv/default.nix
blob: b6c2c6014826e32cf7e1d0281a1cebe3102b26f2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ lib, config, pkgs, ... }:
let cfg = config.my.home.mpv;
in {
  options.my.home.mpv = with lib; {
    enable = mkEnableOption "mpv configuration";
  };

  config = lib.mkIf cfg.enable {
    programs.mpv = {
      enable = true;
      config = {
        sub-auto = "fuzzy";
        vo = "gpu";
        hwdec = "auto-safe";
        gpu-context = "wayland";
      };
      scripts = lib.attrVals [ "sponsorblock" ] pkgs.mpvScripts;
    };
  };
}