fork/home-manager

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

Robert Helgessontests: add option `test.stubs`cb09a968

master
1005 B47 linesraw
1{ config, lib, pkgs, ... }:
2
3with lib;
4
5{
6  config = {
7    programs.htop.enable = true;
8    programs.htop.settings = {
9      color_scheme = 6;
10      cpu_count_from_one = 0;
11      delay = 15;
12      fields = with config.lib.htop.fields; [
13        PID
14        USER
15        PRIORITY
16        NICE
17        M_SIZE
18        M_RESIDENT
19        M_SHARE
20        STATE
21        PERCENT_CPU
22        PERCENT_MEM
23        TIME
24        COMM
25      ];
26      highlight_base_name = 1;
27      highlight_megabytes = 1;
28      highlight_threads = 1;
29    } // (with config.lib.htop;
30      leftMeters [ (bar "AllCPUs2") (bar "Memory") (bar "Swap") (text "Zram") ])
31      // (with config.lib.htop;
32        rightMeters [
33          (text "Tasks")
34          (text "LoadAverage")
35          (text "Uptime")
36          (text "Systemd")
37        ]);
38
39    test.stubs.htop = { };
40
41    nmt.script = ''
42      htoprc=home-files/.config/htop/htoprc
43      assertFileExists $htoprc
44      assertFileContent $htoprc ${./example-htoprc.txt}
45    '';
46  };
47}