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

This commit is contained in:
Elis Hirwing 2019-08-30 13:51:10 +02:00
parent 93a27dbe9f
commit aacf9235d8
No known key found for this signature in database
GPG key ID: D57EFA625C9A925F
2 changed files with 22 additions and 0 deletions

View file

@ -152,6 +152,7 @@
./programs/tmux.nix
./programs/tsm-client.nix
./programs/udevil.nix
./programs/usbtop.nix
./programs/venus.nix
./programs/vim.nix
./programs/wavemon.nix

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"
];
};
}