1
0
Fork 0
mirror of https://github.com/NixOS/nix.dev.git synced 2024-10-18 14:32:43 -04:00

Merge pull request #253 from worktheclock/patch-5

NixOS on Raspberry Pi RITZA language edit
This commit is contained in:
Domen Kožar 2022-04-11 16:16:01 +01:00 committed by GitHub
commit a1dd7842da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -58,24 +58,21 @@ Once that command exits, **move the SD card into your Raspberry Pi and power it
You should be greeted with a fresh shell! You should be greeted with a fresh shell!
In case the image doesn't boot, it's worth [updating the firmware](https://www.raspberrypi.org/documentation/computers/raspberry-pi.html#updating-the-bootloader) In case the image doesn't boot, it's worth [updating the firmware](https://www.raspberrypi.org/documentation/computers/raspberry-pi.html#updating-the-bootloader) and booting the image again.
and retry booting the image again.
## Getting internet connection ## Getting internet connection
Run `sudo -i` to get a root shell for the rest of the tutorial. Run `sudo -i` to get a root shell for the rest of the tutorial.
At this point we'll need internet connection. If you can use an ethernet cable, plug it in. At this point you'll need an internet connection. If you can use an ethernet cable, plug it in.
In case you're connecting to a wifi run `iwconfig` to see what is the name of your wireless If you're connecting to wifi, run `iwconfig` to find the name of your wireless network interface. If it's `wlan0`, replace `SSID` and `passphrase` with your data and run:
network interface. In case it's `wlan0` replace `SSID` and `passphrase` with your data and run:
```shell-session ```shell-session
# wpa_supplicant -B -i wlan0 -c <(wpa_passphrase 'SSID' 'passphrase') & # wpa_supplicant -B -i wlan0 -c <(wpa_passphrase 'SSID' 'passphrase') &
``` ```
Once you see in your terminal that connection is established, run `host nixos.org` to Once you see in your terminal that connection is established, run `host nixos.org` to check that the DNS resolves correctly.
check that DNS resolves correctly.
In case you've made a typo, run `pkill wpa_supplicant` and start over. In case you've made a typo, run `pkill wpa_supplicant` and start over.
@ -91,8 +88,7 @@ To benefit from updates and bug fixes from the vendor, we'll start by updating R
## Installing NixOS ## Installing NixOS
For initial installation we'll install [XFCE](https://www.xfce.org/) desktop environment For the initial installation, we'll install [XFCE](https://www.xfce.org/) desktop environment with user `guest` and SSH daemon.
with user `guest` and SSH daemon.
```nix ```nix
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
@ -156,8 +152,7 @@ To save time on typing the whole configuration, download it:
# curl -L https://tinyurl.com/nixos-rpi4-tutorial > /etc/nixos/configuration.nix # curl -L https://tinyurl.com/nixos-rpi4-tutorial > /etc/nixos/configuration.nix
``` ```
At the top of `/etc/nixos/configuration.nix` there are a few variables that you want to configure, At the top of `/etc/nixos/configuration.nix` there are a few variables that you want to configure, the most important being your wifi connection details, this time specified in declarative way.
most important being your wifi connection details, this time specified in declarative way.
Once you're ready to install NixOS: Once you're ready to install NixOS:
@ -166,14 +161,14 @@ Once you're ready to install NixOS:
# reboot # reboot
``` ```
In case your system doesn't boot, select the oldest configuration in the bootloader menu to get back to live image and start over. If your system doesn't boot, select the oldest configuration in the bootloader menu to get back to live image and start over.
## Making changes ## Making changes
It booted, congratulations! It booted, congratulations!
To make further changes to the configuration, [search through NixOS options](https://search.nixos.org/options), To make further changes to the configuration, [search through NixOS options](https://search.nixos.org/options),
edit `/etc/nixos/configuration.nix` and update your system: edit `/etc/nixos/configuration.nix`, and update your system:
```shell-session ```shell-session
$ sudo -i $ sudo -i
@ -182,8 +177,6 @@ $ sudo -i
## Next steps ## Next steps
- Once you have successfully running OS, try upgrading it with `nixos-rebuild switch --upgrade` - Once you have a successfully running OS, try upgrading it with `nixos-rebuild switch --upgrade` and reboot to the old configuration if something broke.
and reboot to the old configuration if something broke. - To tweak bootloader options affecting hardware, [see config.txt options](https://www.raspberrypi.org/documentation/configuration/config-txt/) and change the options by running `mount /dev/disk/by-label/FIRMWARE /mnt` and opening `/mnt/config.txt`.
- To tweak bootloader options affecting hardware, [see config.txt options](https://www.raspberrypi.org/documentation/configuration/config-txt/)
and change the options by running `mount /dev/disk/by-label/FIRMWARE /mnt` and opening `/mnt/config.txt`.
- To see the power of declarative configuration, try replacing `xfce` with `kodi` in `/etc/nixos/configuration.nix` and `reboot`. - To see the power of declarative configuration, try replacing `xfce` with `kodi` in `/etc/nixos/configuration.nix` and `reboot`.