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