-
-
Notifications
You must be signed in to change notification settings - Fork 19.8k
update netbird server modules #487367
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
update netbird server modules #487367
Changes from all commits
6e29e26
22ddd86
728bb29
fceddd4
0d94724
e553447
5e5258c
10e756f
bd036e5
bd29632
6c35fdf
88ca1de
823ec28
eb194d9
a10f5d6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -180,6 +180,27 @@ in | |
| ''; | ||
| }; | ||
|
|
||
| extraEnvironment = mkOption { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a reason why you declare all these options? If not I would think an generic RFC 42 style ´settings´ option would keep the module smaller.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'venow replaced them with the existing extraEnvironment (freeform attrsOf str) for NB_* env vars and config (freeform JSON) for config.json overrides. Removed just under 200 lines in the process :) hope this is more RFC 42 compliant! |
||
| type = attrsOf str; | ||
| default = { }; | ||
| example = literalExpression '' | ||
| { | ||
| NB_DISABLE_DNS = "true"; | ||
| NB_ALLOW_SERVER_SSH = "true"; | ||
| NB_ENABLE_ROSENPASS = "true"; | ||
| } | ||
| ''; | ||
| description = '' | ||
| Additional environment variables to pass to the NetBird service. | ||
|
|
||
| NetBird features are configured via `NB_*` environment variables | ||
| (e.g. `NB_DISABLE_DNS`, `NB_ALLOW_SERVER_SSH`, `NB_ENABLE_ROSENPASS`). | ||
|
|
||
| These are merged with the computed environment variables, with | ||
| values from this option taking precedence on conflicts. | ||
| ''; | ||
| }; | ||
|
|
||
| interface = mkOption { | ||
| type = str; | ||
| default = "nb-${client.name}"; | ||
|
|
@@ -208,6 +229,7 @@ in | |
| } // optionalAttrs (client.dns-resolver.address != null) { | ||
| NB_DNS_RESOLVER_ADDRESS = "''${client.dns-resolver.address}:''${toString client.dns-resolver.port}"; | ||
| } | ||
| // client.extraEnvironment | ||
| ''; | ||
| description = '' | ||
| Environment for the netbird service, used to pass configuration options. | ||
|
|
@@ -275,10 +297,7 @@ in | |
| - `CAP_NET_RAW`, `CAP_NET_ADMIN` and `CAP_BPF` still give unlimited network manipulation possibilites, | ||
| - older kernels don't have `CAP_BPF` and use `CAP_SYS_ADMIN` instead, | ||
|
|
||
| Known security features that are not (yet) integrated into the module: | ||
| - 2024-02-14: `rosenpass` is an experimental feature configurable solely | ||
| through `--enable-rosenpass` flag on the `netbird up` command, | ||
| see [the docs](https://docs.netbird.io/how-to/enable-post-quantum-cryptography) | ||
| For post-quantum cryptography, set `NB_ENABLE_ROSENPASS = "true"` in `extraEnvironment`. | ||
| ''; | ||
| }; | ||
|
|
||
|
|
@@ -447,7 +466,8 @@ in | |
| } | ||
| // optionalAttrs (client.dns-resolver.address != null) { | ||
| NB_DNS_RESOLVER_ADDRESS = "${client.dns-resolver.address}:${toString client.dns-resolver.port}"; | ||
| }; | ||
| } | ||
| // client.extraEnvironment; | ||
|
|
||
| config.config = { | ||
| DisableAutoConnect = !client.autoStart; | ||
|
|
||
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.
I'm not sure what the official nixpkgs stance is on this but I feel like this basically just lists the options and doesn't really add anything apart from a whole bunch of text to the manual.
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.
Yeah, fair enough. I've trimmed the docs to remove sections that just listed individual options