about summary refs log tree commit diff
path: root/nixos/modules/profiles
diff options
context:
space:
mode:
authorrnhmjoj <rnhmjoj@inventati.org>2021-08-14 15:35:18 +0200
committerrnhmjoj <rnhmjoj@inventati.org>2021-08-15 12:08:32 +0200
commitd857340c8e16a1c080832bbf3566c86fc718c1cf (patch)
tree598fff0e8be7a7519ac708cf9ece7f3eb50f23f4 /nixos/modules/profiles
parent5605b561ce51d3e6b5a56566d6e58fe3e5b36970 (diff)
nixos/installer: simplify and document wifi setup
The wpa_supplicant service in the NixOS installer is unusable because
the control socket is disabled and /etc/wpa_supplicant.conf ignored.

The manual currently recommends manually starting the daemon and using
wpa_passphrase, but this requires figuring out the interface name,
driver and only works for WPA2 personal networks.

By enabling the control socket, instead, a user can configure the
network via wpa_cli (or wpa_gui in the graphical installer), which
support more advanced network configurations.
Diffstat (limited to 'nixos/modules/profiles')
-rw-r--r--nixos/modules/profiles/installation-device.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/nixos/modules/profiles/installation-device.nix b/nixos/modules/profiles/installation-device.nix
index 8e3aa20daa65d..3c503fba2a390 100644
--- a/nixos/modules/profiles/installation-device.nix
+++ b/nixos/modules/profiles/installation-device.nix
@@ -54,7 +54,12 @@ with lib;
       An ssh daemon is running. You then must set a password
       for either "root" or "nixos" with `passwd` or add an ssh key
       to /home/nixos/.ssh/authorized_keys be able to login.
+
+      If you need a wireless connection, type
+      `sudo systemctl start wpa_supplicant` and configure a
+      network using `wpa_cli`. See the NixOS manual for details.
     '' + optionalString config.services.xserver.enable ''
+
       Type `sudo systemctl start display-manager' to
       start the graphical user interface.
     '';
@@ -71,6 +76,7 @@ with lib;
 
     # Enable wpa_supplicant, but don't start it by default.
     networking.wireless.enable = mkDefault true;
+    networking.wireless.userControlled.enable = true;
     systemd.services.wpa_supplicant.wantedBy = mkOverride 50 [];
 
     # Tell the Nix evaluator to garbage collect more aggressively.