diff --git a/common.nix b/common.nix index 0376455..fc56d65 100644 --- a/common.nix +++ b/common.nix @@ -49,7 +49,7 @@ with lib.my; { inetutils man - htop + htop-vim ncdu nload pciutils diff --git a/hosts/rpi3/default.nix b/hosts/rpi3/default.nix index ca022b1..b93c921 100644 --- a/hosts/rpi3/default.nix +++ b/hosts/rpi3/default.nix @@ -67,7 +67,7 @@ networking.firewall.allowedTCPPorts = [ 53 ]; networking.firewall.allowedUDPPorts = [ 53 ]; - environment.systemPackages = with pkgs; [ vim htop ]; + environment.systemPackages = with pkgs; [ vim htop-vim ]; system.stateVersion = "22.05"; } diff --git a/modules/desktop/htop.nix b/modules/desktop/htop.nix index a08cf59..f6632db 100644 --- a/modules/desktop/htop.nix +++ b/modules/desktop/htop.nix @@ -4,18 +4,17 @@ with lib; with lib.my; let cfg = config.modules.desktop.htop; in { - options.modules.desktop.htop = { - enable = mkBoolOpt false; - }; + 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;[ + fields = with config.lib.htop.fields; [ PID USER M_RESIDENT @@ -27,21 +26,19 @@ in { TIME COMM ]; - } // ( - with config.lib.htop; leftMeters [ + } // (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") - ] - ); + ]) // (with config.lib.htop; + rightMeters [ + (bar "RightCPUs2") + (text "Tasks") + (text "LoadAverage") + (text "Uptime") + ]); }; }; };