mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 04:02:55 +03:00
25 lines
469 B
Nix
25 lines
469 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
cfg = config.programs.sniffnet;
|
|
in
|
|
|
|
{
|
|
options = {
|
|
programs.sniffnet = {
|
|
enable = lib.mkEnableOption (lib.mdDoc "sniffnet");
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
security.wrappers.sniffnet = {
|
|
owner = "root";
|
|
group = "root";
|
|
capabilities = "cap_net_raw,cap_net_admin=eip";
|
|
source = "${pkgs.sniffnet}/bin/sniffnet";
|
|
};
|
|
};
|
|
|
|
meta.maintainers = with lib.maintainers; [ figsoda ];
|
|
}
|