From eb064c1c47074247320f65c654e8a50459f627ee Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Mon, 10 Jun 2024 13:01:19 -0400 Subject: [PATCH] add docs on declrative wifi configurations reorganize with TOC --- Home.md | 2 +- Networking.md | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 Networking.md diff --git a/Home.md b/Home.md index 8d715e5..7ebd658 100644 --- a/Home.md +++ b/Home.md @@ -1 +1 @@ -Welcome to the nixcfg wiki! +1. [[Networking]] \ No newline at end of file diff --git a/Networking.md b/Networking.md new file mode 100644 index 0000000..0cbf4f3 --- /dev/null +++ b/Networking.md @@ -0,0 +1,11 @@ +## WiFi + +WiFi networks can be configured declratively in `nixosModules/system/wifi.nix` using `networking.networkmanager.ensureProfiles.profiles`, provided by nixpkgs. + +### Generating WiFi Profiles + +[nm2nix](https://github.com/janik-haag/nm2nix) can generate nix-compatible code for all the WiFi networks in `/etc/NetworkManager/system-connections/` and `/run/NetworkManager/system-connections`. + +```bash +sudo su -c "cd /etc/NetworkManager/system-connections && nix --extra-experimental-features 'nix-command flakes' run github:Janik-Haag/nm2nix | nix --extra-experimental-features 'nix-command flakes' run nixpkgs#nixfmt-rfc-style" +``` \ No newline at end of file