Skip to content

Add integrations with Nix and NixOS #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

tomeon
Copy link

@tomeon tomeon commented Mar 23, 2025

First, thanks very much for your work on this gateway and for the LowPowerLab ecosystem generally.

This PR adds support for deploying the Raspberry Pi Gateway on NixOS. Summary of changes:

  1. Add the services.moteino-gateway NixOS module for configuring the Moteino gateway service (including setup of NginX).
  2. Add the profiles.mighthat NixOS module for integrating the gateway application with the Mighty Hat board.
  3. Add support for merging user-provided configuration into the "core" configuration provided in settings.json5 at the root of this project.
  4. Add support for supplying configuration as plain JSON in addition to supplying it as JSON5 (the Nix expression language is capable of emitting plain JSON, and this is how the services.moteino-gateway NixOS module translates its options to a form consumable by the gateway application).
  5. Use a websocket handler for images uploads, replacing the PHP endpoint.

I realize that the scope of work here is large and non-trivial to review. I am of course open to hearing that I should go fly a kite ;). Thanks in advance for any and all feedback you can provide!

tomeon added 6 commits March 23, 2025 16:36
To support the following:

    1. Splitting immutable "core" data (included with this repository)
       and mutable "user" data (higher-precedence data provided by the
       user), and
    2. Loading plain JSON data (easier to emit with automation tooling).
eliminating the need for PHP/PHP-FPM.
but ignore everything under those dirs except the `.gitignore` files
themselves.
@tomeon tomeon force-pushed the nix-integration branch 3 times, most recently from 642eac1 to 2432641 Compare March 26, 2025 21:36
@tomeon tomeon marked this pull request as ready for review March 26, 2025 21:37
@LowPowerLab
Copy link
Owner

@tomeon Thank you for all the work, I don't know when I'll have time to go over everything but I wanted to acknowledge your submission.

tomeon added 3 commits April 4, 2025 10:27
so that we can run GitHub actions as a non-root user (required for `nix
flake check`).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants