forked from mirrors/nixpkgs
Merge pull request #51749 from Ma27/add-iotop-module
nixos/iotop: add module
This commit is contained in:
commit
1ac5612be8
|
@ -101,6 +101,7 @@
|
|||
./programs/gnupg.nix
|
||||
./programs/gphoto2.nix
|
||||
./programs/iftop.nix
|
||||
./programs/iotop.nix
|
||||
./programs/java.nix
|
||||
./programs/kbdlight.nix
|
||||
./programs/less.nix
|
||||
|
|
18
nixos/modules/programs/iotop.nix
Normal file
18
nixos/modules/programs/iotop.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.programs.iotop;
|
||||
in {
|
||||
options = {
|
||||
programs.iotop.enable = mkEnableOption "iotop + setcap wrapper";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.iotop ];
|
||||
security.wrappers.iotop = {
|
||||
source = "${pkgs.iotop}/bin/iotop";
|
||||
capabilities = "cap_net_admin+p";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue