-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/packetbeat: Add packetbeat module #97152
base: master
Are you sure you want to change the base?
Conversation
Adds a packetbeat module so that it can be configured with freeform settings. Made with big help from @aanderse and @infinisil.
@infinisil here's the config again:
|
@lejonet I think this looks good 👍 I'll defer to @infinisil for final approval and merge, though. |
…pes.listOf format.type and change the default to a list with mkBefore
fc1c8f8
to
4020df1
Compare
…s for packetbeat and hardened the service to not require to be run as root
I marked this as stale due to inactivity. → More info |
Is this ready to be merged ? |
@@ -0,0 +1,289 @@ | |||
{ config, lib, pkgs, ... }: | |||
|
|||
with lib; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with lib; |
Use specific inherits or add lib.
.
package = mkOption { | ||
type = types.package; | ||
default = pkgs.packetbeat; | ||
defaultText = "pkgs.packetbeat"; | ||
example = literalExample "pkgs.packetbeat7"; | ||
description = '' | ||
The packetbeat package to use | ||
''; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
package = mkOption { | |
type = types.package; | |
default = pkgs.packetbeat; | |
defaultText = "pkgs.packetbeat"; | |
example = literalExample "pkgs.packetbeat7"; | |
description = '' | |
The packetbeat package to use | |
''; | |
}; | |
package = mkPackageOption pkgs "packetbeat" { }; |
"CAP_NET_ADMIN" | ||
]; | ||
ExecStart = '' | ||
${cfg.package}/bin/packetbeat \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
${cfg.package}/bin/packetbeat \ | |
${lib.getExe cfg.package} \ |
Motivation for this change
Adds a packetbeat module so that it can be configured with
freeform settings. Made with big help from @aanderse and
@infinisil.
We have the packetbeat package in nixpkgs for some time, but no module, so I decided to make one. It uses the freeform module concept.
Remade PR after screwing up the prior PR with a botched rebase.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)