2021-12-06 16:07:01 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.cnping;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
programs.cnping = {
|
2023-11-16 04:20:00 +00:00
|
|
|
enable = mkEnableOption (lib.mdDoc "a setcap wrapper for cnping");
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
security.wrappers.cnping = {
|
|
|
|
source = "${pkgs.cnping}/bin/cnping";
|
|
|
|
capabilities = "cap_net_raw+ep";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|