Move home config into modules
This commit is contained in:
parent
b08fc5a41e
commit
d5cbf61286
299 changed files with 850 additions and 698 deletions
48
modules/desktop/htop.nix
Normal file
48
modules/desktop/htop.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.my;
|
||||
let cfg = config.modules.desktop.htop;
|
||||
in {
|
||||
options.modules.desktop.htop = {
|
||||
enable = mkBoolOpt false;
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${config.user.name} = { config, ... }: {
|
||||
programs.htop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
hide_userland_threads = true;
|
||||
highlight_base_name = true;
|
||||
vim_mode = true;
|
||||
fields = with config.lib.htop.fields;[
|
||||
PID
|
||||
USER
|
||||
M_RESIDENT
|
||||
M_SHARE
|
||||
STATE
|
||||
PERCENT_CPU
|
||||
PERCENT_MEM
|
||||
IO_RATE
|
||||
TIME
|
||||
COMM
|
||||
];
|
||||
} // (
|
||||
with config.lib.htop; leftMeters [
|
||||
(bar "LeftCPUs2")
|
||||
(bar "CPU")
|
||||
(bar "Memory")
|
||||
(bar "Swap")
|
||||
]
|
||||
) // (
|
||||
with config.lib.htop; rightMeters [
|
||||
(bar "RightCPUs2")
|
||||
(text "Tasks")
|
||||
(text "LoadAverage")
|
||||
(text "Uptime")
|
||||
]
|
||||
);
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue