summaryrefslogtreecommitdiffstats
path: root/common/commandline/htop.nix
blob: 95763a0e32b402590b317295d0c8c5b2a4217980 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
inputs:

{ config, ... }:

{
  home-manager.users.minijackson = { ... }:
  {
    programs.htop = {
      enable = true;

      fields = [
        "PID" "USER"
        "PRIORITY" "NICE"
        "STATE"
        "IO_PRIORITY" "IO_READ_RATE" "IO_WRITE_RATE"
        "PERCENT_CPU" "PERCENT_MEM"
        "TIME"
        "COMM"
      ];

      hideThreads = true;
      hideUserlandThreads = true;
      showThreadNames = true;
      shadowOtherUsers = true;

      highlightBaseName = true;

      # On NixOS? NO.
      showProgramPath = false;

      treeView = true;

      meters = {
        left = [ "LeftCPUs2" "Memory"  "Swap" "Blank" { kind = "Battery"; mode = 1; } ];
        right = [ "RightCPUs2" "Blank" "Tasks" "LoadAverage" "Uptime" ];
      };
    };
  };

  home-manager.users.root = { ... }:
  {
    programs.htop = config.home-manager.users.minijackson.programs.htop // {
      shadowOtherUsers = false;
    };
  };
}