1 { config, lib, pkgs, ... }:
4 cfg = config.programs.mtr;
9 enable = lib.mkOption {
10 type = lib.types.bool;
13 Whether to add mtr to the global environment and configure a
14 setcap wrapper for it.
18 package = lib.mkPackageOption pkgs "mtr" { };
22 config = lib.mkIf cfg.enable {
23 environment.systemPackages = [ cfg.package ];
25 security.wrappers.mtr-packet = {
28 capabilities = "cap_net_raw+p";
29 source = "${cfg.package}/bin/mtr-packet";