3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #51749 from Ma27/add-iotop-module

nixos/iotop: add module
This commit is contained in:
Maximilian Bosch 2019-02-07 16:12:11 +01:00 committed by GitHub
commit 1ac5612be8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View file

@ -101,6 +101,7 @@
./programs/gnupg.nix
./programs/gphoto2.nix
./programs/iftop.nix
./programs/iotop.nix
./programs/java.nix
./programs/kbdlight.nix
./programs/less.nix

View file

@ -0,0 +1,18 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.programs.iotop;
in {
options = {
programs.iotop.enable = mkEnableOption "iotop + setcap wrapper";
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.iotop ];
security.wrappers.iotop = {
source = "${pkgs.iotop}/bin/iotop";
capabilities = "cap_net_admin+p";
};
};
}