1{
2 config,
3 lib,
4 pkgs,
5 ...
6}:
7
8let
9 cfg = config.programs.arp-scan;
10in
11{
12 options = {
13 programs.arp-scan = {
14 enable = lib.mkOption {
15 type = lib.types.bool;
16 default = false;
17 description = ''
18 Whether to configure a setcap wrapper for arp-scan.
19 '';
20 };
21 };
22 };
23
24 config = lib.mkIf cfg.enable {
25 security.wrappers.arp-scan = {
26 owner = "root";
27 group = "root";
28 capabilities = "cap_net_raw+p";
29 source = lib.getExe pkgs.arp-scan;
30 };
31 };
32}