nixpkgs/nixos/modules/programs/cnping.nix

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

20 lines
349 B
Nix
Raw Normal View History

2021-08-21 04:43:43 +02:00
{ config, lib, pkgs, ... }:
let
cfg = config.programs.cnping;
in
{
options = {
programs.cnping = {
enable = lib.mkEnableOption "a setcap wrapper for cnping";
2021-08-21 04:43:43 +02:00
};
};
config = lib.mkIf cfg.enable {
2021-08-21 04:43:43 +02:00
security.wrappers.cnping = {
source = "${pkgs.cnping}/bin/cnping";
capabilities = "cap_net_raw+ep";
};
};
}