mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-11-05 17:56:46 +01:00
22 lines
371 B
Nix
22 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";
|
|
};
|
|
};
|
|
}
|