-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhtop.nix
62 lines (58 loc) · 1.46 KB
/
htop.nix
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{ pkgs, config, lib, aquaris, mkEnableOption, ... }:
let
inherit (lib) mkIf;
cfg = config.aquaris.htop;
in
{
options.aquaris.htop = mkEnableOption "preconfigured htop";
config = mkIf cfg {
programs.htop = {
enable = true;
package = aquaris.inputs.obscura.packages.${pkgs.system}.my-htop;
settings = {
account_guest_in_cpu_meter = 1;
color_scheme = 5;
hide_userland_threads = 1;
highlight_base_name = 1;
highlight_changes = 1;
highlight_changes_delay_secs = 1;
show_cpu_frequency = 1;
show_cpu_temperature = 1;
show_merged_command = 1;
show_program_path = 0;
show_thread_names = 1;
tree_view = 1;
tree_sort_key = config.lib.htop.fields.COMM;
tree_sort_direction = 1;
fields = with config.lib.htop.fields; [
PID
USER
STATE
NICE
PERCENT_CPU
PERCENT_MEM
M_RESIDENT
OOM
TIME
COMM
];
} // (with config.lib.htop; leftMeters [
(bar "AllCPUs")
(bar "Memory")
(bar "Zram")
(bar "DiskIO")
(bar "NetworkIO")
(bar "Load")
(text "Clock")
]) // (with config.lib.htop; rightMeters [
(text "AllCPUs")
(text "Memory")
(text "Zram")
(text "DiskIO")
(text "NetworkIO")
(text "LoadAverage")
(text "Uptime")
]);
};
};
}