-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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/networkmanager: make all plugins optional #84433
Conversation
Missed @jtojnar since they're on the FreeDesktop team too. |
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.
Wording nits.
What error does it produce with noXlibs? |
@jtojnar https://gist.github.com/70307b66431dbba4d125ae48f3f060cc This is one, others fail too with the same error. |
@@ -325,16 +318,75 @@ in { | |||
''; | |||
}; | |||
|
|||
enableFortiSSL = mkOption { |
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 think we might even just remove the VPN plug-ins from basePackages and let users install the VPN providers manually to netowrk-manager.packages
. And using passthru
to let users know what files to link to environment.etc
and tmpfiles.d
(I think there should be a way to make these unnecessary but we can leave that for the future.)
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.
In the current state this PR already removes all VPN plugins from the (now-gone) basePackages
. they get added and configured conditionally on their respective options.
I think this is superior, even if more repetitive on our end, then making the user fiddle with passthru
.
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.
Maintainer would set the passthru
for each plug-in and user would just use netowrk-manager.packages = [ nm-foovpn … ];
.
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.
Re: tmpfiles.d #40594
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 kinda like that @jtojnar. But the thing here with making them all optional, they're currently all off by default and that's going to break existing setups that might have relied on it. So we'd have to add a default set to network-manager.packages
, and I guess some sort of excludedPackages
thing, with all the default plugins in relatedPackages
so users know which one's are there default.
I think having the plugins in a list would make sense.
Should we name it network-manager.plugins
?
But if we decide to have an option per plugin, we need to have all the plugins that were in basePackages to be default true
.
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 do not see a problem with changing defaults, as long as it is properly documented in release notes. We should not have made the option so fat by default in the first place.
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.
If it doesn't get too verbose to use, I'd also prefer having a list like network-manager.[packages|plugins]
over adding tons of options.
👍 on @jtojnar - we can ship less plugins by defaults, if it's properly covered in the release notes.
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 disapprove of this because it isn't a seamless transition. Usually if someone has something installed or configured they'd want this to stay that way. Not to mention we'd probably cause users headache's on nixos-unstable.
This PR will also have to re-add the disabled plugins for many of the desktop manager's that make inferences that these plugins are already there.
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.
But as mentioned by @jtojnar, we have to add information to the respective packages in passthru
that is done intricately here already.
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 so sure about these two comments.
- I think doing these changes is fine if they're documented in the release notes.
- Desktop Environments like plasma and gnome shell could add them (and even if they wouldn't, I think they kinda enumerate the available plugins installed)
This solves an issue with the current NetworkManager module where it's impossible to use it on a system with `environment.noXlibs = true` due to failures in some plugin builds. Moreover, these are entirely optional and not crucial to having NM working and I suspect most don't really need all, possibly any, of these that were built-in. I also attempted to clean up plugin-related side effects that weren't within an "if cfg..." guard, again to minimize the default footprint of the NM module.
Hello, I'm a bot and I thank you in the name of the community for your contributions. Nixpkgs is a busy repository, and unfortunately sometimes PRs get left behind for too long. Nevertheless, we'd like to help committers reach the PRs that are still important. This PR has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human. If this is still important to you and you'd like to remove the stale label, we ask that you leave a comment. Your comment can be as simple as "still important to me". But there's a bit more you can do: If you received an approval by an unprivileged maintainer and you are just waiting for a merge, you can @ mention someone with merge permissions and ask them to help. You might be able to find someone relevant by using Git blame on the relevant files, or via GitHub's web interface. You can see if someone's a member of the nixpkgs-committers team, by hovering with the mouse over their username on the web interface, or by searching them directly on the list. If your PR wasn't reviewed at all, it might help to find someone who's perhaps a user of the package or module you are changing, or alternatively, ask once more for a review by the maintainer of the package/module this is about. If you don't know any, you can use Git blame on the relevant files, or GitHub's web interface to find someone who touched the relevant files in the past. If your PR has had reviews and nevertheless got stale, make sure you've responded to all of the reviewer's requests / questions. Usually when PR authors show responsibility and dedication, reviewers (privileged or not) show dedication as well. If you've pushed a change, it's possible the reviewer wasn't notified about your push via email, so you can always officially request them for a review, or just @ mention them and say you've addressed their comments. Lastly, you can always ask for help at our Discourse Forum, or more specifically, at this thread or at #nixos' IRC channel. |
I think a smaller variant of networkmanager would be useful - like having a headless system, but with NetworkManager as a network manager. We could ensure "common desktop workloads" still work as expected by enabling the plugins from the desktop environments. |
I'm abandoning this for now. Should still be fixed in the future. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/networkmanager-plugins-installed-by-default/39682/8 |
Motivation for this change
This solves an issue with the current NetworkManager module where it's
impossible to use it on a system with
environment.noXlibs = true
dueto failures in some plugin builds.
Moreover, these are entirely optional and not crucial to having NM
working and I suspect most don't really need all, possibly any, of these
that were built-in.
I also attempted to clean up plugin-related side effects that weren't
within an "if cfg..." guard, again to minimize the default footprint of
the NM module.
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)Unsure how I should test this, tagging my usual review frens: @worldofpeace @cole-h @flokli @andir