about summary refs log tree commit diff
path: root/nixos/modules/programs/usbtop.nix
blob: 4f13ce5f6262df14efa1a5b4e40da5dcc66387b6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{ config, pkgs, lib, ... }:

with lib;

let
  cfg = config.programs.usbtop;
in {
  options = {
    programs.usbtop.enable = mkEnableOption "usbtop and required kernel module, to show estimated USB bandwidth";
  };

  config = mkIf cfg.enable {
    environment.systemPackages = with pkgs; [
      usbtop
    ];

    boot.kernelModules = [
      "usbmon"
    ];
  };
}