Skip to content

feat: migrate to flake-parts + devenv, replace attic with nix-bindings#17

Merged
ProjectInitiative merged 6 commits into
mainfrom
feat/devenv-consolidation
Jun 1, 2026
Merged

feat: migrate to flake-parts + devenv, replace attic with nix-bindings#17
ProjectInitiative merged 6 commits into
mainfrom
feat/devenv-consolidation

Conversation

@ProjectInitiative

Copy link
Copy Markdown
Owner

Complete development environment consolidation:

Flake restructure:

  • Replace flake-utils with flake-parts + devenv.flakeModule
  • Add devenv.nix with declarative languages.rust, tools, and config generation
  • Add nixConfig for devenv.cachix.org binary cache
  • Support 4 systems (x86_64/aarch64 linux/darwin)
  • Reduce flake.nix from 310 to 120 lines

Remove attic dependency (broken C++ bindings with nix 2.31+):

  • Drop attic-flake flake input and attic crate from Cargo.toml
  • Vendor nix-bindings crate for C API store operations
  • Add src/nix_store.rs - CLI-backed store ops (nix path-info, nar dump-path, nix-store --query)
  • Add src/hash.rs - Nix hash types from existing deps (sha2, nix-base32)
  • Add src/signing.rs - NixKeypair from existing dep (ed25519-compact)
  • Remove nix version pinning from crane.nix

Dev environment:

  • Add treefmt.toml (nixfmt, rustfmt, shfmt, prettier)
  • Add AGENTS.md with architecture docs and available commands
  • Add devenv.lock + devenv.yaml for devenv 2.x input tracking
  • Update .envrc to use devenv
  • Update .gitignore for .devenv/
  • Disable cachix.enable in devenv.nix to respect system nix config

Testing:

  • All integration tests pass (NixOS VM test with Garage S3)
  • nix flake check passes on all systems
  • nix build produces working binary
  • Fixed narHash parsing to handle nix path-info --json base64 format

TODO: Replace CLI calls (query_path_info, nar_from_path) with nix C API when nix_api_store.h exposes those functions.

Complete development environment consolidation:

Flake restructure:
- Replace flake-utils with flake-parts + devenv.flakeModule
- Add devenv.nix with declarative languages.rust, tools, and config generation
- Add nixConfig for devenv.cachix.org binary cache
- Support 4 systems (x86_64/aarch64 linux/darwin)
- Reduce flake.nix from 310 to 120 lines

Remove attic dependency (broken C++ bindings with nix 2.31+):
- Drop attic-flake flake input and attic crate from Cargo.toml
- Vendor nix-bindings crate for C API store operations
- Add src/nix_store.rs - CLI-backed store ops (nix path-info, nar dump-path, nix-store --query)
- Add src/hash.rs - Nix hash types from existing deps (sha2, nix-base32)
- Add src/signing.rs - NixKeypair from existing dep (ed25519-compact)
- Remove nix version pinning from crane.nix

Dev environment:
- Add treefmt.toml (nixfmt, rustfmt, shfmt, prettier)
- Add AGENTS.md with architecture docs and available commands
- Add devenv.lock + devenv.yaml for devenv 2.x input tracking
- Update .envrc to use devenv
- Update .gitignore for .devenv/
- Disable cachix.enable in devenv.nix to respect system nix config

Testing:
- All integration tests pass (NixOS VM test with Garage S3)
- nix flake check passes on all systems
- nix build produces working binary
- Fixed narHash parsing to handle nix path-info --json base64 format

TODO: Replace CLI calls (query_path_info, nar_from_path) with nix C API
when nix_api_store.h exposes those functions.
@ProjectInitiative ProjectInitiative force-pushed the feat/devenv-consolidation branch from 93cf070 to 933f9e7 Compare June 1, 2026 16:18
@ProjectInitiative ProjectInitiative merged commit 1364917 into main Jun 1, 2026
1 check failed
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.

1 participant