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
networkd: don't managed interfaces set up by script #48811
Conversation
Are there any updates on this pull request, please? |
Still helpfull on my system where |
f99a409
to
cb8b2bf
Compare
@@ -57,6 +57,7 @@ in | |||
|
|||
# ZeroTier does not issue DHCP leases, but some strangers might... | |||
networking.dhcpcd.denyInterfaces = [ "zt*" ]; | |||
networking.notNetworkdManagedInterfaces = "zt*"; |
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.
how do adresses appear on these interfaces? Is that all managed by the zerotierone daemon, or would there be a usecase where I'd do that with networkd? In that case, maybe add just a mkDefault
here…
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.
Ok, done and rebased with current master to avoid conflicts.
24bd90b
to
6e84d5b
Compare
Provides a solution for NixOS#18962.
6e84d5b
to
66705c6
Compare
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.
Thanks for the PR. However, I do not think that this is the best fix going forward. You should instead set networking.useDHCP
to false
and configure only the interfaces you want. We should eventually make networking.useDHCP = true
incompatible with networking.useSystemd = true
.
What do you think about that?
When setting Maybe when |
I think we all agree the current wildcard match on everything definitely is too obtrusive. However, after some thinking, I prefer @fpletz's idea - We can't know all network interfaces we explicitly want to ignore upfront - This is even more the case where people dynamically add interfaces, bridges etc. Only enabling DHCP on interfaces explicitly specified however might be too unflexible, in the case of live installation media for example. What about |
You're right, hard to know which network interfaces to ignore. A match containing the whitelist interfaces is more appropriate. |
Another thing to note here: Matching for This situation is very unfortunate and doesn't leave us with anything useful to match for to replicate the previous behavior or migrate to a more sensible one for |
Motivation for this change
When using networkd, some weird bugs occur (no ip address, interface down). This patch avoids networkd to manage the interfaces configured by the scripted nixos module.
@fpletz @Mic92
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)