fork/home-manager

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

David Warde-Farleyi3status: add `package` attributec485669c

master
1.4 KiB67 linesraw
1{ config, lib, pkgs, ... }:
2
3with lib;
4
5{
6  config = {
7    programs.i3status = {
8      enable = true;
9      enableDefault = false;
10
11      general = {
12        colors = true;
13        color_good = "#e0e0e0";
14        color_degraded = "#d7ae00";
15        color_bad = "#f69d6a";
16        interval = 1;
17      };
18
19      package = config.lib.test.mkStubPackage { };
20
21      modules = {
22        "volume master" = {
23          position = 1;
24          settings = {
25            format = "♪ %volume";
26            format_muted = "♪ muted (%volume)";
27            device = "pulse:1";
28          };
29        };
30        "disk /" = {
31          position = 2;
32          settings = { format = "/ %avail"; };
33        };
34      };
35    };
36
37    test.stubs.i3status = { };
38
39    nmt.script = ''
40      assertFileContent \
41        home-files/.config/i3status/config \
42        ${
43          pkgs.writeText "i3status-expected-config" ''
44            general {
45              color_bad = "#f69d6a"
46              color_degraded = "#d7ae00"
47              color_good = "#e0e0e0"
48              colors = true
49              interval = 1
50            }
51
52            order += "volume master"
53            order += "disk /"
54            disk / {
55              format = "/ %avail"
56            }
57
58            volume master {
59              device = "pulse:1"
60              format = "♪ %volume"
61              format_muted = "♪ muted (%volume)"
62            }
63          ''
64        }
65    '';
66  };
67}