mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 21:49:48 +01:00
55 lines
1.2 KiB
Nix
55 lines
1.2 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
imports = [ ./mpv-stubs.nix ];
|
|
|
|
programs.mpv = {
|
|
enable = true;
|
|
|
|
bindings = {
|
|
WHEEL_UP = "seek 10";
|
|
WHEEL_DOWN = "seek -10";
|
|
"Alt+0" = "set window-scale 0.5";
|
|
};
|
|
|
|
extraInput = ''
|
|
# script-binding uosc/video #! Video tracks
|
|
'';
|
|
|
|
config = {
|
|
force-window = true;
|
|
ytdl-format = "bestvideo+bestaudio";
|
|
cache-default = 4000000;
|
|
};
|
|
|
|
scriptOpts = {
|
|
osc = {
|
|
scalewindowed = 2.0;
|
|
vidscale = false;
|
|
visibility = "always";
|
|
};
|
|
};
|
|
|
|
profiles = {
|
|
fast = { vo = "vdpau"; };
|
|
"protocol.dvd" = {
|
|
profile-desc = "profile for dvd:// streams";
|
|
alang = "en";
|
|
};
|
|
};
|
|
|
|
defaultProfiles = [ "gpu-hq" ];
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileContent \
|
|
home-files/.config/mpv/mpv.conf \
|
|
${./mpv-example-settings-expected-config}
|
|
assertFileContent \
|
|
home-files/.config/mpv/input.conf \
|
|
${./mpv-example-settings-expected-bindings}
|
|
assertFileContent \
|
|
home-files/.config/mpv/script-opts/osc.conf \
|
|
${./mpv-example-settings-expected-osc-opts}
|
|
'';
|
|
}
|