esp32-win98-server#
An ESP-IDF web server that leverages Nix for a reproducible development environment, styled with a Windows 98 aesthetic.
Features#
- Sysinfo: Sysinfo page for a quick look at the ESP hardware's statistics.
- Guestbook: Stores guestbook entries on littlefs.
- Reproducible Environment: Powered by Nix Flakes, ensuring everyone on the team has the exact same development setup.
- ESP-IDF Integration: Uses the
esp-idfframework for ESP32 development. - Web Server: Includes a basic web server to serve static files.
- Custom Build Script: A simple
espbuildcommand to prepare assets and build the project. - Code Formatting: Integrated with
treefmt-nixfor consistent code style.
Prerequisites#
- Nix with Flakes support enabled.
- For non-Nix users, follow the official ESP-IDF Get Started page and check the
flake.nixto see how theespbuildscript works.
Getting Started#
-
Enter the Development Shell:
nix developThis command will download all the necessary dependencies and drop you into a shell with the development environment ready.
-
Build the Project:
Once inside the shell, before running the custom build command run:
cp sdkconfig.default sdkconfig idf.py menuconfigSet
Wifi SSIDandWifi Passwordfrom theWeb server configmenu. then:espbuildThis will:
- Copy and optimize web assets from
main/pagesandmain/assetsintomain/dist. - Run
idf.py buildto compile the project.
- Copy and optimize web assets from
Usage#
After building the project, you can flash it to your ESP32 board.
-
Flash the Firmware:
Connect your ESP32 board and run:
idf.py -p /dev/ttyUSB0 flash(Replace
/dev/ttyUSB0with your board's serial port). -
Monitor the Output:
To see the logs from the device:
idf.py monitor
Code Formatting#
This project uses treefmt-nix to format the codebase. To format all files, run:
nix fmt