refactor(flake): Use my-nix-lib for building rust and devShell #5

Merged
martin merged 1 commit from my-nix-lib into main 2026-07-30 18:01:21 +00:00
Owner
No description provided.
martin self-assigned this 2026-07-30 17:57:17 +00:00
refactor(flake): Use my-nix-lib for building rust and devShell
All checks were successful
ci/woodpecker/pr/pr-review Pipeline was successful
3d3f87e046
Member

Review Summary

This PR replaces the fenix and naersk flake inputs with a single external my flake input (git+https://code.martials.no/Personal/my-nix-lib), which abstracts the Rust toolchain and dev shell setup. The lock file is updated accordingly.

What changed

  • flake.nixfenix + naersk removed; my added. Toolchain setup replaced with my.lib.${system}.rust.mkRustPlatform / mkDevShell. root = ./. changed to src = lib.cleanSource ./..
  • flake.lock — Updated to reflect the new dependency tree; stale fenix_2, naersk, rust-analyzer-src_2 entries removed.

Assessment

This is a clean, focused refactoring. The new dependency is internal to the same organization, the abstraction is reasonable, and lib.cleanSource is a best-practice improvement. No correctness, security, or performance issues found.

Minor observations

  • The lock file shows refs/heads/main for the my input (flake.lock:92). Since Nix pins by rev, this is not a reproducibility concern, but if the intent is to track a specific version, a tag would be more explicit.
  • A duplicate treefmt-nix / treefmt-nix_2 appears in the lock file because the root flake and the my flake each bring their own copy. This is harmless but slightly untidy.

Neither warrants blocking the change.


*🤖 Review by opencode (opencode/deepseek-v4-flash-free) — verdict: approve

# Review Summary This PR replaces the `fenix` and `naersk` flake inputs with a single external `my` flake input (`git+https://code.martials.no/Personal/my-nix-lib`), which abstracts the Rust toolchain and dev shell setup. The lock file is updated accordingly. ## What changed - **flake.nix** — `fenix` + `naersk` removed; `my` added. Toolchain setup replaced with `my.lib.${system}.rust.mkRustPlatform` / `mkDevShell`. `root = ./.` changed to `src = lib.cleanSource ./.`. - **flake.lock** — Updated to reflect the new dependency tree; stale `fenix_2`, `naersk`, `rust-analyzer-src_2` entries removed. ## Assessment This is a clean, focused refactoring. The new dependency is internal to the same organization, the abstraction is reasonable, and `lib.cleanSource` is a best-practice improvement. No correctness, security, or performance issues found. ## Minor observations - The lock file shows `refs/heads/main` for the `my` input (`flake.lock:92`). Since Nix pins by `rev`, this is not a reproducibility concern, but if the intent is to track a specific version, a tag would be more explicit. - A duplicate `treefmt-nix` / `treefmt-nix_2` appears in the lock file because the root flake and the `my` flake each bring their own copy. This is harmless but slightly untidy. Neither warrants blocking the change. --- *🤖 Review by opencode (opencode/deepseek-v4-flash-free) — verdict: **approve**
martin merged commit 86009bc559 into main 2026-07-30 18:01:21 +00:00
martin deleted branch my-nix-lib 2026-07-30 18:01:21 +00:00
Sign in to join this conversation.
No description provided.