2023-11-27 17:45:10 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.dublin-traceroute;
|
|
|
|
|
|
|
|
in {
|
|
|
|
meta.maintainers = pkgs.dublin-traceroute.meta.maintainers;
|
|
|
|
|
|
|
|
options = {
|
|
|
|
programs.dublin-traceroute = {
|
2024-06-03 16:59:45 +00:00
|
|
|
enable = lib.mkEnableOption "dublin-traceroute (including setcap wrapper)";
|
2023-11-27 17:45:10 +00:00
|
|
|
|
2024-04-17 11:37:58 +00:00
|
|
|
package = lib.mkPackageOption pkgs "dublin-traceroute" { };
|
2023-11-27 17:45:10 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-04-17 11:37:58 +00:00
|
|
|
config = lib.mkIf cfg.enable {
|
2023-11-27 17:45:10 +00:00
|
|
|
environment.systemPackages = [ cfg.package ];
|
|
|
|
|
|
|
|
security.wrappers.dublin-traceroute = {
|
|
|
|
owner = "root";
|
|
|
|
group = "root";
|
|
|
|
capabilities = "cap_net_raw+p";
|
2024-04-17 11:37:58 +00:00
|
|
|
source = lib.getExe cfg.package;
|
2023-11-27 17:45:10 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|