diff --git a/users/jalr/modules/cli.nix b/users/jalr/modules/cli.nix deleted file mode 100644 index f07297b..0000000 --- a/users/jalr/modules/cli.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ nixosConfig, lib, pkgs, ... }: -{ - home.packages = with pkgs; [ - cached-nix-shell - eza - file - htop - inetutils - jq - lsof - ncdu - ripgrep - unzip - ] ++ (if ! nixosConfig.jalr.workstation.enable then [ ] else [ - direnv - dnsutils - screen - speedtest-cli - usbutils - wget - yt-dlp - ]); -} diff --git a/users/jalr/modules/cli/default.nix b/users/jalr/modules/cli/default.nix new file mode 100644 index 0000000..caae5d3 --- /dev/null +++ b/users/jalr/modules/cli/default.nix @@ -0,0 +1,28 @@ +{ nixosConfig, lib, pkgs, ... }: +{ + imports = [ + ./htop.nix + ]; + + config = { + home.packages = with pkgs; [ + cached-nix-shell + eza + file + inetutils + jq + lsof + ncdu + ripgrep + unzip + ] ++ (if ! nixosConfig.jalr.workstation.enable then [ ] else [ + direnv + dnsutils + screen + speedtest-cli + usbutils + wget + yt-dlp + ]); + }; +} diff --git a/users/jalr/modules/cli/htop.nix b/users/jalr/modules/cli/htop.nix new file mode 100644 index 0000000..86dbf6c --- /dev/null +++ b/users/jalr/modules/cli/htop.nix @@ -0,0 +1,25 @@ +{ nixosConfig +, config +, lib +, ... +}: + +{ + programs.htop = { + enable = true; + settings = { + color_scheme = 6; + } // (with config.lib.htop; leftMeters ([ + (bar "LeftCPUs") + (bar "Memory") + ] ++ lib.lists.optional nixosConfig.zramSwap.enable (bar "Zram") ++ [ + ] ++ lib.lists.optional (!(nixosConfig.swapDevices == [ ])) (bar "Swap") ++ [ + (bar "DiskIO") + ])) // (with config.lib.htop; rightMeters [ + (bar "RightCPUs") + (text "Tasks") + (text "LoadAverage") + (text "NetworkIO") + ]); + }; +} diff --git a/users/jalr/modules/default.nix b/users/jalr/modules/default.nix index 9207861..6775d19 100644 --- a/users/jalr/modules/default.nix +++ b/users/jalr/modules/default.nix @@ -5,7 +5,7 @@ ./3d-printing.nix ./alacritty.nix ./aws.nix - ./cli.nix + ./cli ./communication ./direnv.nix ./dynamic-colors.nix