diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 75df6c8d453c..fc03d05b07d9 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -152,6 +152,7 @@ ./programs/tmux.nix ./programs/tsm-client.nix ./programs/udevil.nix + ./programs/usbtop.nix ./programs/venus.nix ./programs/vim.nix ./programs/wavemon.nix diff --git a/nixos/modules/programs/usbtop.nix b/nixos/modules/programs/usbtop.nix new file mode 100644 index 000000000000..c1b6ee38caa1 --- /dev/null +++ b/nixos/modules/programs/usbtop.nix @@ -0,0 +1,21 @@ +{ config, pkgs, lib, ... }: + +with lib; + +let + cfg = config.programs.usbtop; +in { + options = { + programs.usbtop.enable = mkEnableOption "usbtop and required kernel module"; + }; + + config = mkIf cfg.enable { + environment.systemPackages = with pkgs; [ + usbtop + ]; + + boot.kernelModules = [ + "usbmon" + ]; + }; +}