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