2021-12-06 16:07:01 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.cnping;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
programs.cnping = {
|
2024-04-21 15:54:59 +00:00
|
|
|
enable = mkEnableOption "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";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|