inputs: { config, ... }: { home-manager.sharedModules = [ { xdg.configFile."htop/htoprc".force = true; } ]; home-manager.users.minijackson = { config, ... }: { programs.htop = { enable = true; settings = { color_scheme = 5; fields = with config.lib.htop.fields; [ PID USER PRIORITY NICE STATE IO_PRIORITY IO_READ_RATE IO_WRITE_RATE PERCENT_CPU PERCENT_MEM TIME COMM ]; hide_threads = true; hide_kernel_threads = true; hide_userland_threads = true; show_thread_names = true; shadow_other_users = true; highlight_base_name = true; # On NixOS? NO. show_program_path = false; tree_view = true; left_meters = [ "LeftCPUs" "Memory" "Swap" "Zram" "Blank" "Battery" ]; left_meter_modes = with config.lib.htop.modes; [ Bar Bar Bar Bar Text Bar ]; right_meters = [ "RightCPUs" "Blank" "Tasks" "LoadAverage" "Uptime" "Systemd" ]; right_meter_modes = with config.lib.htop.modes; [ Bar Text Text Text Text Text ]; # TODO: this doesn't keep the order: # https://github.com/nix-community/home-manager/issues/2060 /* } // (with config.lib.htop; leftMeters { LeftCPUs2 = modes.Bar; Memory = modes.Bar; Swap = modes.Bar; Blank = modes.Text; Battery = modes.Bar; }) // (with config.lib.htop; rightMeters { RightCPUs2 = modes.Bar; Blank = modes.Text; Tasks = modes.Text; LoadAverage = modes.Text; Uptime = modes.Text; }); */ }; }; }; home-manager.users.root = { ... }: { programs.htop = { enable = true; settings = config.home-manager.users.minijackson.programs.htop.settings // { shadowOtherUsers = false; }; }; }; }