Format using nixfmt rfc style
This commit is contained in:
parent
d07a224bbc
commit
f6be5f8b80
37 changed files with 934 additions and 612 deletions
|
|
@ -1,45 +1,61 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
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;
|
||||
package = pkgs.htop-vim;
|
||||
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")
|
||||
]);
|
||||
let
|
||||
cfg = config.modules.desktop.htop;
|
||||
in
|
||||
{
|
||||
options.modules.desktop.htop = {
|
||||
enable = lib.my.mkBoolOpt false;
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
home-manager.users.${config.user.name} =
|
||||
{ config, ... }:
|
||||
{
|
||||
programs.htop = {
|
||||
enable = true;
|
||||
package = pkgs.htop-vim;
|
||||
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