Unverified Commit 142d79ba authored by 7c6f434c's avatar 7c6f434c Committed by GitHub
Browse files

nixos/iotop: make package overridable (#397921)

parents 9504a52e b35b54bf
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -10,14 +10,17 @@ let
in
{
  options = {
    programs.iotop.enable = lib.mkEnableOption "iotop + setcap wrapper";
    programs.iotop = {
      enable = lib.mkEnableOption "iotop + setcap wrapper";
      package = lib.mkPackageOption pkgs "iotop" { example = "iotop-c"; };
    };
  };
  config = lib.mkIf cfg.enable {
    security.wrappers.iotop = {
      owner = "root";
      group = "root";
      capabilities = "cap_net_admin+p";
      source = "${pkgs.iotop}/bin/iotop";
      source = lib.getExe cfg.package;
    };
  };
}