diff options
author | volth <volth@volth.com> | 2020-01-17 21:25:34 +0000 |
---|---|---|
committer | volth <volth@volth.com> | 2020-01-17 21:28:54 +0000 |
commit | d5d1293fe35b92059f5671a5f27db0c00549bdb0 (patch) | |
tree | 7210e5b359fe16b9aed9b2f483aa086b086e1563 /nixos/modules/programs/traceroute.nix | |
parent | 8c7a5613f3bc14f3584d3db6bed342c6804203ef (diff) | |
download | nixpkgs-d5d1293fe35b92059f5671a5f27db0c00549bdb0.tar nixpkgs-d5d1293fe35b92059f5671a5f27db0c00549bdb0.tar.gz nixpkgs-d5d1293fe35b92059f5671a5f27db0c00549bdb0.tar.bz2 nixpkgs-d5d1293fe35b92059f5671a5f27db0c00549bdb0.tar.lz nixpkgs-d5d1293fe35b92059f5671a5f27db0c00549bdb0.tar.xz nixpkgs-d5d1293fe35b92059f5671a5f27db0c00549bdb0.tar.zst nixpkgs-d5d1293fe35b92059f5671a5f27db0c00549bdb0.zip |
nixos/traceroute: init
Diffstat (limited to 'nixos/modules/programs/traceroute.nix')
-rw-r--r-- | nixos/modules/programs/traceroute.nix | 26 |
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 00000000000..4eb0be3f0e0 --- /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"; + }; + }; +} |