2018-12-08 21:48:00 +01:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.iotop;
|
|
|
|
in {
|
|
|
|
options = {
|
2022-08-28 21:18:44 +02:00
|
|
|
programs.iotop.enable = mkEnableOption (lib.mdDoc "iotop + setcap wrapper");
|
2018-12-08 21:48:00 +01:00
|
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
security.wrappers.iotop = {
|
2021-09-12 18:53:48 +02:00
|
|
|
owner = "root";
|
|
|
|
group = "root";
|
2018-12-08 21:48:00 +01:00
|
|
|
capabilities = "cap_net_admin+p";
|
2021-09-12 18:53:48 +02:00
|
|
|
source = "${pkgs.iotop}/bin/iotop";
|
2018-12-08 21:48:00 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|