2024-01-02 11:29:13 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.dublin-traceroute;
|
|
|
|
|
|
|
|
in {
|
|
|
|
meta.maintainers = pkgs.dublin-traceroute.meta.maintainers;
|
|
|
|
|
|
|
|
options = {
|
|
|
|
programs.dublin-traceroute = {
|
2024-05-15 15:35:15 +00:00
|
|
|
enable = lib.mkEnableOption ''
|
2024-01-02 11:29:13 +00:00
|
|
|
dublin-traceroute, add it to the global environment and configure a setcap wrapper for it.
|
2024-04-21 15:54:59 +00:00
|
|
|
'';
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
package = lib.mkPackageOption pkgs "dublin-traceroute" { };
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
config = lib.mkIf cfg.enable {
|
2024-01-02 11:29:13 +00:00
|
|
|
environment.systemPackages = [ cfg.package ];
|
|
|
|
|
|
|
|
security.wrappers.dublin-traceroute = {
|
|
|
|
owner = "root";
|
|
|
|
group = "root";
|
|
|
|
capabilities = "cap_net_raw+p";
|
2024-05-15 15:35:15 +00:00
|
|
|
source = lib.getExe cfg.package;
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|