Build improvements: cache policy, stock CUDA Ollama, and Nova concurrency #83

Merged
nimmo merged 3 commits from build-improvements into main 2026-07-21 19:39:26 +01:00
Owner

Summary

  • replace source-built Mouzi with a declarative downloads organiser
  • restore Attic upstream-substitute filtering to avoid uploading outputs already available elsewhere
  • use the stock CUDA-enabled Ollama package now that its build is substitutable
  • rebalance Nova cache builds to 8 jobs × 4 cores, preserving its 32-thread budget while accelerating large ROCm builds

Validation

  • nix flake check
  • bash -n scripts/attic-cache-build.sh
  • ./tests/auto-update-regressions.sh
  • targeted nix build .#nixosConfigurations.lyra.pkgs.ollama-cuda --no-link --print-build-logs
## Summary - replace source-built Mouzi with a declarative downloads organiser - restore Attic upstream-substitute filtering to avoid uploading outputs already available elsewhere - use the stock CUDA-enabled Ollama package now that its build is substitutable - rebalance Nova cache builds to 8 jobs × 4 cores, preserving its 32-thread budget while accelerating large ROCm builds ## Validation - `nix flake check` - `bash -n scripts/attic-cache-build.sh` - `./tests/auto-update-regressions.sh` - targeted `nix build .#nixosConfigurations.lyra.pkgs.ollama-cuda --no-link --print-build-logs`
perf: rebalance Nova cache build concurrency
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 34s
Build and Push Attic Cache / build (pull_request) Has been skipped
AI pull-request review / review (pull_request) Successful in 4m25s
2060523f5b
Author
Owner

Automated code review

Reviewed commit: 2060523f5bef408d539d49bee00e938d33fe5684

Verdict: Requires further work

Resolve the blocking or important findings and investigate failed deterministic checks before merging.

Overall assessment

The pull request removes the Mouzi flake input and package, replacing it with a declarative systemd user timer/oneshot service for download organization. It updates the Attic cache workflow to check upstream substituters before pushing (removing --ignore-upstream-cache-filter) and rebalances Nova's build concurrency to 8 jobs × 4 cores while maintaining the 32-thread budget. The Ollama CUDA package override is removed, relying on an upstream nixpkgs fix.

Blocking findings

None.

Important findings

  • Ollama CUDA override removal depends on upstream nixpkgs fix (modules/profiles/ollama.nix:24; medium confidence)
    Removed nvidiaPackage override that patched CUDA_PATH and CUDAToolkit_ROOT; now uses pkgs.ollama-cuda directly.
    Impact: If the pinned nixpkgs revision has not yet merged the upstream fix for CUDAToolkit_ROOT, Ollama CUDA builds will fail during configuration.
    Suggested fix: Verify that the current nixpkgs pin includes the upstream correction. If not, retain a minimal override or update the nixpkgs input to a revision containing the fix.

Suggestions

None.

Tests and validation

  • nix-flake-check: success

Questions

  • Has the pinned nixpkgs revision been verified to contain the upstream fix for Ollama's CUDAToolkit_ROOT configuration issue?

Review limitations

  • Review is based solely on the provided diff and PR description; runtime behavior of the new download organizer and Attic cache push logic cannot be fully validated without live execution logs.
  • flake.lock updates and package version bumps are not analyzed for regression risk per guidance.

Diff coverage

  • .forgejo/workflows/attic-cache.yml: reviewed — included in a context-limited batch
  • README.md: reviewed — included in a context-limited batch
  • flake.lock: reviewed — included in a context-limited batch
  • flake.nix: reviewed — included in a context-limited batch
  • home/nimmo.nix: reviewed — included in a context-limited batch
  • lib/auto-update-policy.nix: reviewed — included in a context-limited batch
  • modules/desktop/apps.nix: reviewed — included in a context-limited batch
  • modules/profiles/ollama.nix: reviewed — included in a context-limited batch
  • packages/mouzi.nix: reviewed — included in a context-limited batch
  • scripts/attic-cache-build.sh: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: qwen3.6:35b-a3b-q8_0
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md
  • Commits considered: 3
  • Previous automated review: none found
  • Findings: 1
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `2060523f5bef408d539d49bee00e938d33fe5684` ## Verdict: Requires further work Resolve the blocking or important findings and investigate failed deterministic checks before merging. ### Overall assessment The pull request removes the Mouzi flake input and package, replacing it with a declarative systemd user timer/oneshot service for download organization. It updates the Attic cache workflow to check upstream substituters before pushing (removing --ignore-upstream-cache-filter) and rebalances Nova's build concurrency to 8 jobs × 4 cores while maintaining the 32-thread budget. The Ollama CUDA package override is removed, relying on an upstream nixpkgs fix. ### Blocking findings None. ### Important findings - **Ollama CUDA override removal depends on upstream nixpkgs fix** (modules/profiles/ollama.nix:24; medium confidence) Removed nvidiaPackage override that patched CUDA_PATH and CUDAToolkit_ROOT; now uses pkgs.ollama-cuda directly. Impact: If the pinned nixpkgs revision has not yet merged the upstream fix for CUDAToolkit_ROOT, Ollama CUDA builds will fail during configuration. Suggested fix: Verify that the current nixpkgs pin includes the upstream correction. If not, retain a minimal override or update the nixpkgs input to a revision containing the fix. ### Suggestions None. ### Tests and validation - nix-flake-check: **success** ### Questions - Has the pinned nixpkgs revision been verified to contain the upstream fix for Ollama's CUDAToolkit_ROOT configuration issue? ### Review limitations - Review is based solely on the provided diff and PR description; runtime behavior of the new download organizer and Attic cache push logic cannot be fully validated without live execution logs. - flake.lock updates and package version bumps are not analyzed for regression risk per guidance. ### Diff coverage - `.forgejo/workflows/attic-cache.yml`: **reviewed** — included in a context-limited batch - `README.md`: **reviewed** — included in a context-limited batch - `flake.lock`: **reviewed** — included in a context-limited batch - `flake.nix`: **reviewed** — included in a context-limited batch - `home/nimmo.nix`: **reviewed** — included in a context-limited batch - `lib/auto-update-policy.nix`: **reviewed** — included in a context-limited batch - `modules/desktop/apps.nix`: **reviewed** — included in a context-limited batch - `modules/profiles/ollama.nix`: **reviewed** — included in a context-limited batch - `packages/mouzi.nix`: **reviewed** — included in a context-limited batch - `scripts/attic-cache-build.sh`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: qwen3.6:35b-a3b-q8_0 - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md - Commits considered: 3 - Previous automated review: none found - Findings: 1 </details>
Author
Owner

Review follow-up: verified the pinned Nixpkgs CUDA Ollama recipe. It now constructs its CUDA toolkit with cuda_nvcc and adds cuda_nvcc to nativeBuildInputs (the previous local workaround predated this). The exact stock derivation also evaluates and substitutes successfully with nix build .#nixosConfigurations.lyra.pkgs.ollama-cuda --no-link --print-build-logs.

No compatibility override has been restored: doing so would create a distinct local derivation and forfeit the verified upstream substitute.

Review follow-up: verified the pinned Nixpkgs CUDA Ollama recipe. It now constructs its CUDA toolkit with `cuda_nvcc` and adds `cuda_nvcc` to `nativeBuildInputs` (the previous local workaround predated this). The exact stock derivation also evaluates and substitutes successfully with `nix build .#nixosConfigurations.lyra.pkgs.ollama-cuda --no-link --print-build-logs`. No compatibility override has been restored: doing so would create a distinct local derivation and forfeit the verified upstream substitute.
nimmo merged commit 9ead3773b0 into main 2026-07-21 19:39:26 +01:00
nimmo deleted branch build-improvements 2026-07-21 19:39:27 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nimmo/nixos-config!83
No description provided.