2018-12-08 21:48:00 +01: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 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
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|