[RESOLVED] No network connectivity on boot

Hi there,

I can’t seem my NixOS to connect to my WiFi on boot and without logging in interactively.

I have tried the doing the following:

  1. NetworkManager
    It doesn’t connect until I log in regardless what I do. I have put it on the networking.target to ensure it starts up early on boot. I have then used the nmtui (as root) to set up the connection and supplied the password. Ticked it to “auto connect” to the wifi, rebooted and that’s it. It remains offline until I actually go ahead and log in as a user.

After that I have put the password manually into /etc/NetworkManager/system-connections/my.network

But that still wouldn’t work.

  networking.networkmanager.enable = true;
  networking.firewall.enable = true;
  networking.nftables.enable = true;
  systemd.services.NetworkManager = {
    wantedBy = [ "network.target" ];
  };
  1. network.wireless.enable
    I have also tried the following approach, disabling network manager completely and doing this:
  networking.wireless.networks = {
    "my network" = {
      psk = "mypasswd";
    };
 };

 networking.useDHCP = true;

But in this case the machine won’t connect to wireless at all.

Is there something I am missing? I want NixOS connecting to wifi without me having to log in.

Ok I got it working, this is very stupid, but the password was wrong. Sorry for bothering anyone.