nixos/usbtop: Add module to install usbtop and to enable kernel module

This commit is contained in:
Elis Hirwing
2019-08-30 18:54:33 +02:00
parent 93a27dbe9f
commit aacf9235d8
2 changed files with 22 additions and 0 deletions
+21
View File
@@ -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"
];
};
}