From 5d396a92e1a5ccba548551814d9719e31536fb8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Gro=C3=9Fmann?= Date: Sat, 21 Jan 2023 23:51:42 +0100 Subject: [PATCH] feat: Added htop config --- configuration.nix | 1 - users/common/default.nix | 1 + users/common/htop.nix | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 users/common/htop.nix diff --git a/configuration.nix b/configuration.nix index 256f739..bf0fcc7 100644 --- a/configuration.nix +++ b/configuration.nix @@ -109,7 +109,6 @@ vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. xterm wget - htop gcc tree ]; diff --git a/users/common/default.nix b/users/common/default.nix index 4caebdd..3878c16 100644 --- a/users/common/default.nix +++ b/users/common/default.nix @@ -5,6 +5,7 @@ }: { imports = [ ./zsh.nix + ./htop.nix ]; home.packages = with pkgs; [ diff --git a/users/common/htop.nix b/users/common/htop.nix new file mode 100644 index 0000000..70eca97 --- /dev/null +++ b/users/common/htop.nix @@ -0,0 +1,32 @@ +{config, ...}: { + programs.htop = { + enable = true; + settings = + { + tree_view = 1; + highlight_base_name = 1; + show_cpu_frequency = 1; + show_cpu_temperature = 1; + show_program_path = 0; + hide_kernel_threads = 1; + hide_userland_threads = 1; + sort_key = 46; # Sort by %CPU if not in tree mode + } + // (with config.lib.htop; + leftMeters [ + (bar "LeftCPUs2") + (bar "Memory") + (bar "Swap") + (bar "ZFSARC") + (text "NetworkIO") + ]) + // (with config.lib.htop; + rightMeters [ + (bar "RightCPUs2") + (text "LoadAverage") + (text "Tasks") + (text "Uptime") + (text "Systemd") + ]); + }; +}