2021-12-06 16:07:01 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.cnping;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
programs.cnping = {
|
2024-05-15 15:35:15 +00:00
|
|
|
enable = lib.mkEnableOption "a setcap wrapper for cnping";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
config = lib.mkIf cfg.enable {
|
2021-12-06 16:07:01 +00:00
|
|
|
security.wrappers.cnping = {
|
|
|
|
source = "${pkgs.cnping}/bin/cnping";
|
|
|
|
capabilities = "cap_net_raw+ep";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|