diff --git a/README.md b/README.md index 629e468..92dbad1 100644 --- a/README.md +++ b/README.md @@ -318,6 +318,54 @@ nix build .#nixosConfigurations.usagers.config.system.build.toplevel nix build .#nixosConfigurations.installer-iso ``` +## Connexion Wi-Fi + +Pour un PC sans câble réseau (après l'installation, ou en dépannage). + +### Option 1 — NetworkManager + +Déjà actif par défaut dans ce repo (`hosts/common/base.nix`). Rien à ajouter dans `configuration.nix`. + +```nix +networking.networkmanager.enable = true; +``` + +Commandes : + +```bash +nmcli device wifi list +nmcli device wifi connect "SSID" password "MOTDEPASSE" +nmcli connection show +nmcli radio wifi on +``` + +### Option 2 — iwd + +Alternative non nécessaire. Plus léger que NetworkManager, mais NetworkManager est déjà en place et suffit — à utiliser seulement si une raison précise l'impose. + +`configuration.nix` : + +```nix +networking.wireless.iwd.enable = true; +``` + +Commandes : + +```bash +iwctl station wlan0 scan +iwctl station wlan0 get-networks +iwctl station wlan0 connect "SSID" +iwctl station wlan0 show +``` + +Aucun paquet à installer manuellement : `enable = true` suffit dans les deux cas. + +Après édition : + +```bash +sudo nixos-rebuild switch --flake .#usagers +``` + --- # Travailler avec Git