depot/third_party/nixpkgs/nixos/modules/programs/dublin-traceroute.nix
Default email 98eb3e9ef5 Project import generated by Copybara.
GitOrigin-RevId: 00d80d13810dbfea8ab4ed1009b09100cca86ba8
2024-07-01 15:47:52 +00:00

27 lines
619 B
Nix

{ config, lib, pkgs, ... }:
let
cfg = config.programs.dublin-traceroute;
in {
meta.maintainers = pkgs.dublin-traceroute.meta.maintainers;
options = {
programs.dublin-traceroute = {
enable = lib.mkEnableOption "dublin-traceroute (including setcap wrapper)";
package = lib.mkPackageOption pkgs "dublin-traceroute" { };
};
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
security.wrappers.dublin-traceroute = {
owner = "root";
group = "root";
capabilities = "cap_net_raw+p";
source = lib.getExe cfg.package;
};
};
}