nixpkgs/nixos/modules/programs/arp-scan.nix
Sandro Jäckel 89b1270199 nixos/{arp-scan,iftop,tcpdump,traceroute}: format
(cherry picked from commit b4d622fd7a)
2024-11-19 10:04:11 +00:00

33 lines
532 B
Nix

{
config,
lib,
pkgs,
...
}:
let
cfg = config.programs.arp-scan;
in
{
options = {
programs.arp-scan = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Whether to configure a setcap wrapper for arp-scan.
'';
};
};
};
config = lib.mkIf cfg.enable {
security.wrappers.arp-scan = {
owner = "root";
group = "root";
capabilities = "cap_net_raw+p";
source = lib.getExe pkgs.arp-scan;
};
};
}