fork/home-manager

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

Robert Helgessontests: add option `test.stubs`cb09a968

master
1.2 KiB59 linesraw
1{ pkgs, ... }:
2
3{
4  config = {
5    programs.ncmpcpp = {
6      enable = true;
7      mpdMusicDir = "/home/user/music";
8
9      settings = {
10        user_interface = "alternative";
11        display_volume_level = false;
12        playlist_disable_highlight_delay = 0;
13      };
14
15      bindings = [
16        {
17          key = "j";
18          command = "scroll_down";
19        }
20        {
21          key = "k";
22          command = "scroll_up";
23        }
24        {
25          key = "J";
26          command = [ "select_item" "scroll_down" ];
27        }
28        {
29          key = "K";
30          command = [ "select_item" "scroll_up" ];
31        }
32        {
33          key = "x";
34          command = "delete_playlist_items";
35        }
36        {
37          key = "x";
38          command = "delete_browser_items";
39        }
40        {
41          key = "x";
42          command = "delete_stored_playlist";
43        }
44      ];
45    };
46
47    test.stubs.ncmpcpp = { };
48
49    nmt.script = ''
50      assertFileContent \
51        home-files/.config/ncmpcpp/config \
52        ${./ncmpcpp-example-settings-expected-config}
53
54      assertFileContent \
55        home-files/.config/ncmpcpp/bindings \
56        ${./ncmpcpp-example-settings-expected-bindings}
57    '';
58  };
59}