3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/nixos/modules/programs/cnping.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
371 B
Nix
Raw Normal View History

2021-08-21 03:43:43 +01:00
{ 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";
};
};
}