2020-04-24 23:36:52 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.usbtop;
|
|
|
|
in {
|
|
|
|
options = {
|
2022-09-09 14:08:57 +00:00
|
|
|
programs.usbtop.enable = mkEnableOption (lib.mdDoc "usbtop and required kernel module");
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
usbtop
|
|
|
|
];
|
|
|
|
|
|
|
|
boot.kernelModules = [
|
|
|
|
"usbmon"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|