8ac5e011d6
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
17 lines
325 B
Nix
17 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";
|
|
};
|
|
};
|
|
}
|