3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/nixos/modules/programs/iotop.nix
Maximilian Bosch 6a0d2ff7c1
nixos/iotop: don't install the package globally
The binary will be in `/run/wrappers/bin` and adding `pkgs.iotop` won't
have any effect.

See also https://github.com/NixOS/nixpkgs/pull/51749#discussion_r254724170
2019-02-07 16:52:01 +01:00

18 lines
325 B
Nix

{ 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 = {
source = "${pkgs.iotop}/bin/iotop";
capabilities = "cap_net_admin+p";
};
};
}