summary refs log tree commit diff
path: root/nixos/modules/programs/usbtop.nix
blob: c1b6ee38caa1d78624d27256b523fbe39f8d1235 (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";
  };

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

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