mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 08:01:14 +00:00
18 lines
325 B
Nix
18 lines
325 B
Nix
|
{ config, pkgs, lib, ... }:
|
||
|
|
||
|
with lib;
|
||
|
|
||
|
let
|
||
|
cfg = config.programs.iotop;
|
||
|
in {
|
||
|
options = {
|
||
|
programs.iotop.enable = mkEnableOption "iotop + setcap wrapper";
|
||
|
};
|
||
|
config = mkIf cfg.enable {
|
||
|
security.wrappers.iotop = {
|
||
|
source = "${pkgs.iotop}/bin/iotop";
|
||
|
capabilities = "cap_net_admin+p";
|
||
|
};
|
||
|
};
|
||
|
}
|