2018-12-08 20:48:00 +00:00
|
|
|
{ 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 = {
|
2021-09-12 17:53:48 +01:00
|
|
|
owner = "root";
|
|
|
|
group = "root";
|
2018-12-08 20:48:00 +00:00
|
|
|
capabilities = "cap_net_admin+p";
|
2021-09-12 17:53:48 +01:00
|
|
|
source = "${pkgs.iotop}/bin/iotop";
|
2018-12-08 20:48:00 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|