diff options
author | Peder Bergebakken Sundt <pbsds@hotmail.com> | 2023-11-30 18:17:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-30 18:17:24 +0100 |
commit | 637577f1bb470621820900dcbc3ceef400d37f65 (patch) | |
tree | 602fae4c18148fa47c55d583a4bd0a59a5eda5dd /nixos/modules/programs | |
parent | c4b427e1555e1c6e40c71492c70650f2892f802f (diff) | |
parent | 070bcf9da438a76495f624fc31b2be8036ee7a30 (diff) | |
download | nixlib-637577f1bb470621820900dcbc3ceef400d37f65.tar nixlib-637577f1bb470621820900dcbc3ceef400d37f65.tar.gz nixlib-637577f1bb470621820900dcbc3ceef400d37f65.tar.bz2 nixlib-637577f1bb470621820900dcbc3ceef400d37f65.tar.lz nixlib-637577f1bb470621820900dcbc3ceef400d37f65.tar.xz nixlib-637577f1bb470621820900dcbc3ceef400d37f65.tar.zst nixlib-637577f1bb470621820900dcbc3ceef400d37f65.zip |
Merge pull request #261704 from baloo/baloo/dublin-traceroute/init
dublin-traceroute: init at 2023.04.12
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r-- | nixos/modules/programs/dublin-traceroute.nix | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/nixos/modules/programs/dublin-traceroute.nix b/nixos/modules/programs/dublin-traceroute.nix new file mode 100644 index 000000000000..cfcd6e8308ff --- /dev/null +++ b/nixos/modules/programs/dublin-traceroute.nix @@ -0,0 +1,31 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.programs.dublin-traceroute; + +in { + meta.maintainers = pkgs.dublin-traceroute.meta.maintainers; + + options = { + programs.dublin-traceroute = { + enable = mkEnableOption (mdDoc '' + dublin-traceroute, add it to the global environment and configure a setcap wrapper for it. + ''); + + package = mkPackageOption pkgs "dublin-traceroute" { }; + }; + }; + + config = mkIf cfg.enable { + environment.systemPackages = [ cfg.package ]; + + security.wrappers.dublin-traceroute = { + owner = "root"; + group = "root"; + capabilities = "cap_net_raw+p"; + source = getExe cfg.package; + }; + }; +} |