-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
systemd-networkd: Add wireguard-related options. #64040
Conversation
27e8226
to
7763fd5
Compare
"PrivateKeyFile" "ListenPort" "FwMark" | ||
]) | ||
(assertInt "ListenPort") | ||
(assertInt "FwMark") |
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.
ListenPort
takes either value between 1 and 65535 or auto
[1]. FwMark
takes a number between 1 and 4294967295 according to man/systemd.netdev.xml
[2]. Also looks like it got renamed to FirewallMark
but FwMark
looks like it still exists [3].
[1] https://github.com/NixOS/systemd/blob/5c20aab77900f478fd380ab189787d80e4a35963/man/systemd.netdev.xml#L1254
[2] https://github.com/systemd/systemd/blob/master/man/systemd.netdev.xml#L1490
[3] https://github.com/systemd/systemd/blob/master/test/fuzz/fuzz-netdev-parser/directives.netdev#L13
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.
Just corrected the PR according to your remarks regarding ListenPort
and the extra spaces.
As for FwMark
, it seems that the current pinned systemd is not supporting this new syntax yet.
[Edit]: I forgot the obvious: thanks for the review :)
Add wireguard-related `netdev` options and their associated nixos test.
As for PrivateKey and PreshareKey, why not include them also but give a warning in the description? There might be good reason to use them even if they become world-accessible in the nix store. |
I agree - we should include them, but warn. |
Note that there is a PrivateKeyFile option in 242 |
@arianvp this PR adds it already - I still think we shouldn't artificially limit what a user can do. Warning if sb shoots into is food should probably be enough ;-) |
Closing in favor of #45392 |
Motivation for this change
The
systemd.network
nixos module is lacking the wireguard-related options.Things done
Add wireguard-related
netdev
options and their associated nixos test.Note: I omitted both the
PrivateKey
andPresharedKey
options to prevent the user from leaking private keys to the store.sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)