nixos/cnping: init
This commit is contained in:
parent
fd5a074a9b
commit
2ba28b7226
2 changed files with 22 additions and 0 deletions
|
@ -127,6 +127,7 @@
|
|||
./programs/cdemu.nix
|
||||
./programs/chromium.nix
|
||||
./programs/clickshare.nix
|
||||
./programs/cnping.nix
|
||||
./programs/command-not-found/command-not-found.nix
|
||||
./programs/criu.nix
|
||||
./programs/dconf.nix
|
||||
|
|
21
nixos/modules/programs/cnping.nix
Normal file
21
nixos/modules/programs/cnping.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ 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";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue