{ pkgs, ... }:
{
  home.packages = [
    pkgs.mpv
  ];
  xdg.configFile."mpv/input.conf".text = ''
    # Volume normalization
    # See https://github.com/mpv-player/mpv/issues/3979
    Alt+a cycle-values af "dynaudnorm=f=75:g=25:n=0:p=0.58" "loudnorm" ""
    Alt+f cycle video-unscaled

    # Show all chapters (like a right-clic on |<< or >>|)
    c show_text ''${chapter-list}
  '';
  xdg.configFile."mpv/mpv.conf".text = ''
    hwdec=auto-safe
    profile=gpu-hq
    vo=gpu
    ytdl-format=18/mp4-480p/hls-480p/http-360p/mp4
  '';
}