diff options
author | Mark Nipper <nipsy@bitgnome.net> | 2024-05-03 02:21:38 -0700 |
---|---|---|
committer | Mark Nipper <nipsy@bitgnome.net> | 2024-05-03 02:21:38 -0700 |
commit | 20281b3c52482bef3b00cf6947c64b1b942b9249 (patch) | |
tree | 1560d047199dad3fc52d64feb5b498742113c0d0 /doc | |
parent | 34fb0f6d36a56c2e1996f5899ce1ac5eb11838f2 (diff) | |
download | nix-20281b3c52482bef3b00cf6947c64b1b942b9249.tar nix-20281b3c52482bef3b00cf6947c64b1b942b9249.tar.gz nix-20281b3c52482bef3b00cf6947c64b1b942b9249.tar.bz2 nix-20281b3c52482bef3b00cf6947c64b1b942b9249.tar.lz nix-20281b3c52482bef3b00cf6947c64b1b942b9249.tar.xz nix-20281b3c52482bef3b00cf6947c64b1b942b9249.tar.zst nix-20281b3c52482bef3b00cf6947c64b1b942b9249.zip |
Add some extra documentation
Diffstat (limited to '')
-rw-r--r-- | doc/rescue.md | 38 | ||||
-rw-r--r-- | doc/wpa_supplicant.md | 29 |
2 files changed, 67 insertions, 0 deletions
diff --git a/doc/rescue.md b/doc/rescue.md new file mode 100644 index 0000000..431246a --- /dev/null +++ b/doc/rescue.md @@ -0,0 +1,38 @@ +# Using NixOS Installer as Rescue Environment + +As with most Linux distributions, you will need to mount your +core file systems under `/mnt`. You don't need to worry about +the virtual file systems, just the real ones, including any boot +or ESP partitions. You can also skip swap for now. + +Once you are done with that, you can simply type `nixos-enter` to +pivot into the chroot. You will probably also want to `unset +SUDO_USER` if you used `sudo -i` or something similar, as having +it set will probably cause issues when trying to run +`nixos-rebuild`. + +Should you need to manually set up the rescue environment, beyond +the physical mounts already done above, you will also need to run +the following: + +``` +mount -o bind /dev /mnt/dev +mount -o bind /proc /mnt/proc +mount -o bind /sys /mnt/sys +chroot /mnt /nix/var/nix/profiles/system/activate +chroot /mnt /run/current-system/sw/bin/bash +``` + +Lastly, should you get the following error when trying to run +`nixos-rebuild switch` within your rescue environment, usually +caused by systemd as the bootloader: + +``` +error: System has not been booted with systemd as init system (PID 1). Can't operate. +``` + +you can instead try running `nixos-rebuild boot`. If that also +fails, you can try appending those commands with +`NIXOS_SWITCH_USE_DIRTY_ENV=1` which might work around the +problem. And should none of that work, you can try to use +`nixos-install` as a last resort. diff --git a/doc/wpa_supplicant.md b/doc/wpa_supplicant.md new file mode 100644 index 0000000..ba36f0d --- /dev/null +++ b/doc/wpa_supplicant.md @@ -0,0 +1,29 @@ +# Enabling Wireless in NixOS Installer + +Assuming you have a wireless interface directly supported by the +installer's kernel (and if not, have you tried the unstable +installer ISO yet?), you will need some extra commands beyond the +admittedly brief notes about wpa_supplicant in the installer's +shell and the man page for wpa_cli itself. + +As the brief note does say, you can get started with: + +``` +sudo systemctl start wpa_supplicant` +wpa_cli +``` + +Once inside the CLI, you then need the following: + +``` +scan +scan_results +add_network 0 +set_network 0 ssid "Some SSID" +set_network 0 psk "some password" +enable_network 0 +save_config +quit +``` + +`dhcpcd` should run automatically. |