fork/home-manager

git clone https://git.julia.blue/fork/home-manager

Chuang Zhumpv: add scriptOpts option, fix tests (#3491)e386ec64

master
1.2 KiB55 linesraw
1{ config, lib, pkgs, ... }:
2
3{
4  config = {
5    programs.mpv = {
6      enable = true;
7      package = pkgs.mpvDummy;
8
9      bindings = {
10        WHEEL_UP = "seek 10";
11        WHEEL_DOWN = "seek -10";
12        "Alt+0" = "set window-scale 0.5";
13      };
14
15      config = {
16        force-window = true;
17        ytdl-format = "bestvideo+bestaudio";
18        cache-default = 4000000;
19      };
20
21      scriptOpts = {
22        osc = {
23          scalewindowed = 2.0;
24          vidscale = false;
25          visibility = "always";
26        };
27      };
28
29      profiles = {
30        fast = { vo = "vdpau"; };
31        "protocol.dvd" = {
32          profile-desc = "profile for dvd:// streams";
33          alang = "en";
34        };
35      };
36
37      defaultProfiles = [ "gpu-hq" ];
38    };
39
40    test.stubs.mpvDummy = { };
41
42    nmt.script = ''
43      assertFileContent \
44         home-files/.config/mpv/mpv.conf \
45         ${./mpv-example-settings-expected-config}
46      assertFileContent \
47         home-files/.config/mpv/input.conf \
48         ${./mpv-example-settings-expected-bindings}
49      assertFileContent \
50         home-files/.config/mpv/script-opts/osc.conf \
51         ${./mpv-example-settings-expected-osc-opts}
52    '';
53  };
54
55}