about summary refs log tree commit diff
path: root/nixos/modules/programs/iotop.nix
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2019-02-09 12:14:06 -0500
committerMatthew Bauer <mjbauer95@gmail.com>2019-02-09 12:14:06 -0500
commit5c09d977c794d9243ddac17f6c429b5432431f8f (patch)
tree1acbd7e7f0c01546d955d47c6a8fddfec8e632b6 /nixos/modules/programs/iotop.nix
parent21d991b1fd78214023551a0dada17b129cbd5cd5 (diff)
parent18d059a4ac001fbaa9c2abc750a2830a52e1dae5 (diff)
downloadnixlib-5c09d977c794d9243ddac17f6c429b5432431f8f.tar
nixlib-5c09d977c794d9243ddac17f6c429b5432431f8f.tar.gz
nixlib-5c09d977c794d9243ddac17f6c429b5432431f8f.tar.bz2
nixlib-5c09d977c794d9243ddac17f6c429b5432431f8f.tar.lz
nixlib-5c09d977c794d9243ddac17f6c429b5432431f8f.tar.xz
nixlib-5c09d977c794d9243ddac17f6c429b5432431f8f.tar.zst
nixlib-5c09d977c794d9243ddac17f6c429b5432431f8f.zip
Merge remote-tracking branch 'origin/master' into staging
Diffstat (limited to 'nixos/modules/programs/iotop.nix')
-rw-r--r--nixos/modules/programs/iotop.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/nixos/modules/programs/iotop.nix b/nixos/modules/programs/iotop.nix
new file mode 100644
index 000000000000..5512dbc62f72
--- /dev/null
+++ b/nixos/modules/programs/iotop.nix
@@ -0,0 +1,17 @@
+{ 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";
+    };
+  };
+}