mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
89b1270199
(cherry picked from commit b4d622fd7a
)
33 lines
532 B
Nix
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;
|
|
};
|
|
};
|
|
}
|