2019-08-30 13:51:10 +02:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.usbtop;
|
|
|
|
in {
|
|
|
|
options = {
|
2022-08-28 21:18:44 +02:00
|
|
|
programs.usbtop.enable = mkEnableOption (lib.mdDoc "usbtop and required kernel module");
|
2019-08-30 13:51:10 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
usbtop
|
|
|
|
];
|
|
|
|
|
|
|
|
boot.kernelModules = [
|
|
|
|
"usbmon"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|