feat(nix): add official Nix/NixOS support with auto-update workflow#246
Open
realitymolder wants to merge 1 commit into
Open
feat(nix): add official Nix/NixOS support with auto-update workflow#246realitymolder wants to merge 1 commit into
realitymolder wants to merge 1 commit into
Conversation
Add a flake + nix/package.nix derivation building Terax for x86_64-linux, x86_64-darwin, and aarch64-darwin, with nixosModules and darwinModules for easy system integration. Extract version and SRI hashes into nix/sources.json consumed by the derivation via builtins.fromJSON, and add a GitHub Actions workflow triggered on release published that downloads assets, computes SRI hashes, and opens a PR bumping sources.json automatically.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a flake + nix/package.nix derivation building Terax for x86_64-linux, x86_64-darwin, and aarch64-darwin, with nixosModules and darwinModules for easy system integration.
Extract version and SRI hashes into nix/sources.json consumed by the derivation via builtins.fromJSON, and add a GitHub Actions workflow triggered on release published that downloads assets, computes SRI hashes, and opens a PR bumping sources.json automatically.
What
Add official Nix/NixOS support via a flake + nix/package.nix derivation, and a release workflow to keep the Nix sources up to date automatically.
Why
Nix was not previously supported as an installation method. Manual bumping of version + three hashes on every release is also error-prone — the workflow automates it.
How
builtins.fromJSON (builtins.readFile ./sources.json) loads version and per-platform hashes. The release workflow uses openssl dgst -sha256 -binary + base64 to produce SRI hashes matching Nix's sha256-... format. The flake provides packages.terax, nixosModules.terax, and darwinModules.terax.
Testing
Notes for reviewer
First-class Nix support for the project — the flake is the canonical way to install on NixOS.