Summary
This issue tracks adding Nix flake support to the upstream project so users can install and run it without cloning or compiling manually.
What Nix provides
- Pure / Hermetic builds: every input — compiler, libraries, system dependencies — is pinned in
flake.lock. If it builds today, it builds in ten years.
- Reproducible: the exact same derivation always produces the exact same output bit-for-bit (modulo timestamps). No "works on my machine."
- Idempotent installs: running
nix profile install twice is a no-op. The system reaches the declared state and stays there.
- Rollback-able:
nix profile rollback restores the previous profile generation instantly. Broken update? One command back.
- Declarative: the entire build is a single expression (flake.nix). No imperative
apt install, brew install, make dance.
- Cross-platform: same
nix run github:owner/repo works on macOS (Apple Silicon & Intel) and Linux. The flake handles platform-specific dependencies.
- Zero-install runs:
nix run fetches from binary cache when available. No clone, no compile, no cargo build.
- No system pollution:
nix profile install adds to a user-specific profile. Uninstall cleanly with nix profile remove. No orphaned global packages.
- Atomic upgrades / downgrades: profiles are switched atomically. No half-upgraded state.
Current gap
The project currently only documents source builds (npm install). There is no one-command install path for users who already have Nix.
Proposed change
- Add flake.nix with
packages.default and apps.default
- Add devbox.json for reproducible development environments
- Update README install section to include Nix (flakes) and Devbox instructions
Branch
feat-nix-package-manager-install on the fork.
Implementation
I have prepared the implementation in my fork at:
https://github.com/levonk/space-agent/tree/feat-nix-package-manager-install
The changes include:
- flake.nix: Nix flake with
packages.default and apps.default using Node.js 22 (Node.js 20 is marked as insecure)
- devbox.json: Devbox configuration for reproducible development environments
- README.md: added "With Nix (flakes)" and "With Devbox" install subsections
Tested locally with nix build . and binary execution verification.
Summary
This issue tracks adding Nix flake support to the upstream project so users can install and run it without cloning or compiling manually.
What Nix provides
flake.lock. If it builds today, it builds in ten years.nix profile installtwice is a no-op. The system reaches the declared state and stays there.nix profile rollbackrestores the previous profile generation instantly. Broken update? One command back.apt install,brew install,makedance.nix run github:owner/repoworks on macOS (Apple Silicon & Intel) and Linux. The flake handles platform-specific dependencies.nix runfetches from binary cache when available. No clone, no compile, nocargo build.nix profile installadds to a user-specific profile. Uninstall cleanly withnix profile remove. No orphaned global packages.Current gap
The project currently only documents source builds (
npm install). There is no one-command install path for users who already have Nix.Proposed change
packages.defaultandapps.defaultBranch
feat-nix-package-manager-installon the fork.Implementation
I have prepared the implementation in my fork at:
https://github.com/levonk/space-agent/tree/feat-nix-package-manager-install
The changes include:
packages.defaultandapps.defaultusing Node.js 22 (Node.js 20 is marked as insecure)Tested locally with
nix build .and binary execution verification.