MPV: Difference between revisions
shorten mpv override flags, merge "mpv scripts" section into configuration section |
fix configuration example |
||
Line 34: | Line 34: | ||
}; | }; | ||
</syntaxhighlight>A more comprehensive configuration of MPV would look like this.<syntaxhighlight lang="nix"> | </syntaxhighlight>A more comprehensive configuration of MPV would look like this.<syntaxhighlight lang="nix"> | ||
programs.mpv = { | { pkgs, ... }: | ||
{ | |||
programs.mpv = { | |||
enable = true; | |||
# Custom package configuration for MPV | |||
package = ( | |||
pkgs.mpv-unwrapped.wrapper { | |||
# To find more scripts run this in a terminal: nix search nixpkgs mpvScripts | # To find more scripts run this in a terminal: nix search nixpkgs mpvScripts | ||
# The scripts are defined in the following Nixpkgs directory: https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/video/mpv/scripts | # The scripts are defined in the following Nixpkgs directory: https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/video/mpv/scripts | ||
Line 48: | Line 49: | ||
sponsorblock | sponsorblock | ||
]; | ]; | ||
mpv = pkgs.mpv-unwrapped.override { | |||
# Find more override options in the expression: | |||
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/video/mpv/default.nix | |||
waylandSupport = true; | |||
}; | |||
} | |||
); | |||
# MPV configuration options | |||
config = { | |||
profile = "high-quality"; | |||
ytdl-format = "bestvideo+bestaudio"; | |||
cache-default = 4000000; | |||
}; | |||
}; | }; | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||