2021-01-22 00:10:12 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
2024-02-03 19:39:45 +01:00
|
|
|
imports = [ ./mpv-stubs.nix ];
|
2021-01-22 00:10:12 +01:00
|
|
|
|
2024-02-03 19:39:45 +01:00
|
|
|
programs.mpv = {
|
|
|
|
enable = true;
|
2021-01-22 00:10:12 +01:00
|
|
|
|
2024-02-03 19:39:45 +01:00
|
|
|
bindings = {
|
|
|
|
WHEEL_UP = "seek 10";
|
|
|
|
WHEEL_DOWN = "seek -10";
|
|
|
|
"Alt+0" = "set window-scale 0.5";
|
|
|
|
};
|
2023-03-21 11:33:36 +01:00
|
|
|
|
2024-02-03 19:39:45 +01:00
|
|
|
config = {
|
|
|
|
force-window = true;
|
|
|
|
ytdl-format = "bestvideo+bestaudio";
|
|
|
|
cache-default = 4000000;
|
|
|
|
};
|
|
|
|
|
|
|
|
scriptOpts = {
|
|
|
|
osc = {
|
|
|
|
scalewindowed = 2.0;
|
|
|
|
vidscale = false;
|
|
|
|
visibility = "always";
|
2021-01-22 00:10:12 +01:00
|
|
|
};
|
2024-02-03 19:39:45 +01:00
|
|
|
};
|
2021-01-22 00:10:12 +01:00
|
|
|
|
2024-02-03 19:39:45 +01:00
|
|
|
profiles = {
|
|
|
|
fast = { vo = "vdpau"; };
|
|
|
|
"protocol.dvd" = {
|
|
|
|
profile-desc = "profile for dvd:// streams";
|
|
|
|
alang = "en";
|
|
|
|
};
|
2021-01-22 00:10:12 +01:00
|
|
|
};
|
|
|
|
|
2024-02-03 19:39:45 +01:00
|
|
|
defaultProfiles = [ "gpu-hq" ];
|
2021-01-22 00:10:12 +01:00
|
|
|
};
|
|
|
|
|
2024-02-03 19:39:45 +01:00
|
|
|
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}
|
|
|
|
'';
|
2021-01-22 00:10:12 +01:00
|
|
|
}
|