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
networkmanager: allow iwd
as Wi-Fi backend
#51803
Conversation
Really excited to see iwd being used, thanks for your work! I gave this a try, cherry-picked your commit on top of release-18.09 applied, and tried switching my system to it, Nix complains about
reverting your commit gets it to build again, so this gets introduced by your commit :-/ |
This looks like the same collision like the one I'm trying to prevent using the assertion for making sure Does anyone have an idea how to tackle this properly? |
Duplicate of #48851 |
@eliasp can you look at the linked PR, see if some of your changes need to be incorporated there? |
@@ -400,6 +408,12 @@ in { | |||
networking.networkmanager.dns = "dnsmasq" | |||
''; | |||
} | |||
{ assertion = !config.networking.wireless.iwd.enable; |
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.
Would it be better to combine this assertion with the first one, since they're both trying to do the same thing albeit for different packages.
Also, if I'm not wrong, using iwd as the backend still requires iwd.service
to be started as well?
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.
@eadwu How can the service be started? I booted this in a VM and the daemon wasn't started.
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.
Since enabling networking.wireless.iwd.enable
would trigger the assertion, you can try just manually applying the configuration [1]. I don't know whether or not NetworkManager uses the DBus implementation though.
[1] https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/networking/iwd.nix#L18
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 actually 100% sure the assertion should be there in the first place. I'll see if I have time to dig deeper.
@@ -34,6 +34,8 @@ let | |||
|
|||
[device] | |||
wifi.scan-rand-mac-address=${if cfg.wifi.scanRandMacAddress then "yes" else "no"} | |||
${optionalString (cfg.wifi.backend != null) | |||
''wifi.backend=${cfg.wifi.backend}''} |
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.
As far as I can see, backend
is never null
, so this can be simplified.
This pull request has been mentioned on Nix community. There might be relevant details there: https://discourse.nixos.org/t/iwd-service-not-started/2154/2 |
Is there a chance to get it merged for 19.03? |
@eliasp assuming I'm extremely lazy, is there anything missing, unfinished or unresolved here? At a glance I see change requests are still open. For those having tested the PR, does it work fine? Anything particular to note? |
This pull request has been mentioned on Nix community. There might be relevant details there: https://discourse.nixos.org/t/nixos-19-03-feature-freeze/1950/33 |
@samueldr I have been using this PR on a nixos-unstable-based system for the last 2 days and have found some problems with it:
(1.) should probably be fixably with some systemd trickery Please query me for any additional logs/settings/etc. I'd be happy to help. |
This is coming from upstream. |
@asymmetric I knew the service file was provided by iwd but still found it notable that networkmanager would start a service specifically named "net.connman.iwd". Are iwd and connman related projects? If so then the "default" service just being named this way would of course make sense. |
Yes, both are built by Intel. |
Commenting on the confusion about the assertion, but also on the introduced options: From what I read, networkmanager needs, Currently, in the NixOS module system, it's This is a bit of a mess, as Option 1We might want to either rename the Option 2I also thought about keeping However, the iwd config file format doesn't seem to be that well documented, and there's a lot of |
could you rebase please ? wouldl ike to try as my wifi has gone crazy recently :s |
FWIW I'm using this without NetworkManager (nor connman), and it works great. |
I tried to use iwd as a standalone (well with Network manager in background too) and it crashed. |
Maybe get rid of/stop NM and try again? |
I'm using this PR, rebased, to much success. It is incredible how much better (read: faster) this seems to work for me than networkmanager+wpa_supplicant. |
@colemickens where is the fork ? would like to try again, the wifi experience with networkmanager is not great as far as I am concerned. |
@teto I'm using it on my fork with my |
Maybe new PR with that commit, @colemickens? |
@colemickens Thanks for picking it up, rebasing it etc. - I simply didn't find any time recently to take care of the PR. |
Motivation for this change
I wanted to make use of iwd as wireless backend for NetworkManager.
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)Couldn't fully test it locally yet due to the number of packages having to be rebuilt in my local KF5/Plasma-based environment.