nixpkgs-suyu/nixos/modules/programs/iotop.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
381 B
Nix
Raw Normal View History

{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.programs.iotop;
in {
options = {
programs.iotop.enable = mkEnableOption (lib.mdDoc "iotop + setcap wrapper");
};
config = mkIf cfg.enable {
security.wrappers.iotop = {
owner = "root";
group = "root";
capabilities = "cap_net_admin+p";
source = "${pkgs.iotop}/bin/iotop";
};
};
}