nixpkgs-suyu/nixos/modules/programs/cnping.nix
2021-10-14 21:27:38 +03:00

21 lines
371 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.cnping;
in
{
options = {
programs.cnping = {
enable = mkEnableOption "Whether to install a setcap wrapper for cnping";
};
};
config = mkIf cfg.enable {
security.wrappers.cnping = {
source = "${pkgs.cnping}/bin/cnping";
capabilities = "cap_net_raw+ep";
};
};
}