at 23.05-pre 552 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 = lib.mdDoc '' 14 Whether to configure a setcap wrapper for traceroute. 15 ''; 16 }; 17 }; 18 }; 19 20 config = mkIf cfg.enable { 21 security.wrappers.traceroute = { 22 owner = "root"; 23 group = "root"; 24 capabilities = "cap_net_raw+p"; 25 source = "${pkgs.traceroute}/bin/traceroute"; 26 }; 27 }; 28}