at 21.11-pre 498 B view raw
1{ config, lib, pkgs, ... }: 2 3with lib; 4 5let 6 cfg = config.programs.traceroute; 7in { 8 options = { 9 programs.traceroute = { 10 enable = mkOption { 11 type = types.bool; 12 default = false; 13 description = '' 14 Whether to configure a setcap wrapper for traceroute. 15 ''; 16 }; 17 }; 18 }; 19 20 config = mkIf cfg.enable { 21 security.wrappers.traceroute = { 22 source = "${pkgs.traceroute}/bin/traceroute"; 23 capabilities = "cap_net_raw+p"; 24 }; 25 }; 26}