mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 15:27:20 +03:00
22 lines
334 B
Nix
22 lines
334 B
Nix
|
{ 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"
|
||
|
];
|
||
|
};
|
||
|
}
|