2020-04-24 23:36:52 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.iotop;
|
|
|
|
in {
|
|
|
|
options = {
|
2022-09-09 14:08:57 +00:00
|
|
|
programs.iotop.enable = mkEnableOption (lib.mdDoc "iotop + setcap wrapper");
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
security.wrappers.iotop = {
|
2021-09-22 15:38:15 +00:00
|
|
|
owner = "root";
|
|
|
|
group = "root";
|
2020-04-24 23:36:52 +00:00
|
|
|
capabilities = "cap_net_admin+p";
|
2021-09-22 15:38:15 +00:00
|
|
|
source = "${pkgs.iotop}/bin/iotop";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|