about summary refs log tree commit diff
path: root/nixos/modules/programs
diff options
context:
space:
mode:
authorSilvan Mosberger <contact@infinisil.com>2020-01-20 22:32:33 +0100
committerGitHub <noreply@github.com>2020-01-20 22:32:33 +0100
commit3929a0fbcac5e39cfa0445f61b0358dc1eda275e (patch)
tree850fbcf3c47b3751dcf3150ff0ae9627023385d0 /nixos/modules/programs
parent651e73484e7842b02d6f05422479b99dbe2606c1 (diff)
parentd5d1293fe35b92059f5671a5f27db0c00549bdb0 (diff)
downloadnixlib-3929a0fbcac5e39cfa0445f61b0358dc1eda275e.tar
nixlib-3929a0fbcac5e39cfa0445f61b0358dc1eda275e.tar.gz
nixlib-3929a0fbcac5e39cfa0445f61b0358dc1eda275e.tar.bz2
nixlib-3929a0fbcac5e39cfa0445f61b0358dc1eda275e.tar.lz
nixlib-3929a0fbcac5e39cfa0445f61b0358dc1eda275e.tar.xz
nixlib-3929a0fbcac5e39cfa0445f61b0358dc1eda275e.tar.zst
nixlib-3929a0fbcac5e39cfa0445f61b0358dc1eda275e.zip
nixos/traceroute: init (#77953)
nixos/traceroute: init
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r--nixos/modules/programs/traceroute.nix26
1 files changed, 26 insertions, 0 deletions
diff --git a/nixos/modules/programs/traceroute.nix b/nixos/modules/programs/traceroute.nix
new file mode 100644
index 000000000000..4eb0be3f0e0b
--- /dev/null
+++ b/nixos/modules/programs/traceroute.nix
@@ -0,0 +1,26 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+  cfg = config.programs.traceroute;
+in {
+  options = {
+    programs.traceroute = {
+      enable = mkOption {
+        type = types.bool;
+        default = false;
+        description = ''
+          Whether to configure a setcap wrapper for traceroute.
+        '';
+      };
+    };
+  };
+
+  config = mkIf cfg.enable {
+    security.wrappers.traceroute = {
+      source = "${pkgs.traceroute}/bin/traceroute";
+      capabilities = "cap_net_raw+p";
+    };
+  };
+}