rpi_setup/README.md

50 lines
1.2 KiB
Markdown

# Raspberry Pi Setup
Repository to automatically setup raspberry pi img for the **Gowest**.
## Requirements
- [rpi-imager](https://www.raspberrypi.com/software/): Official Raspberry Pi
Imager.
> Make sure `rpi-imager` is in your path
```sh
# linux
sudo apt install rpi-imager
# windows
winget install --id=RaspberryPiFoundation.RaspberryPiImager
# macos
brew install --cask raspberry-pi-imager
```
- [deno](https://deno.land): Scripts and task runner.
```sh
# linux
curl -fsSL https://deno.land/install.sh | sh
# windows
winget install --id=DenoLand.Deno
# macos
brew install deno
```
## Usage
1. Fill your `.env` file (see `.env.example`) or pass env through cli.
2. Check and/or edit the `config.json` file.
3. Run `deno task setup` to automatically flash drive for your **Gowest**.
`setup` task run the following tasks in order:
1. `setup:prepare`: Build img install script (create users, set hostname, set
wifi, set ssh, ...).
2. `setup:image`: Download and unzip img.
3. `setup:flash`: Flash boot drive with img and install script.
4. `setup:clean`: Clean all builds outputs.
Additionally you can write task individually if you already have done one task.