Skip to content

fix(nix): keep docs and CI out of the derivation sources - #2652

Merged
boudra merged 1 commit into
getpaseo:mainfrom
colonelpanic8:nix-desktop-src-scope
Jul 31, 2026
Merged

fix(nix): keep docs and CI out of the derivation sources#2652
boudra merged 1 commit into
getpaseo:mainfrom
colonelpanic8:nix-desktop-src-scope

Conversation

@colonelpanic8

Copy link
Copy Markdown
Contributor

Problem

nix/package.nix and nix/desktop-package.nix both take the whole repository
as src and exclude only a handful of paths. That leaves docs/, .github/,
docker/, the agent/editor config directories and the top-level markdown as
build inputs of both derivations.

None of them reach the build, but any one of them changing produces a new
derivation and therefore a full rebuild — including the Expo web export, which
dominates the build — to arrive at a byte-identical result. A docs-only or
workflow-only commit currently costs a complete desktop rebuild.

The npmDeps coupling

Tightening the desktop filter alone does nothing, which is worth spelling out:
desktop-package.nix inherits npmDeps from the daemon, so the daemon's src
feeds the desktop derivation too. With only the desktop filter changed, a
docs-only edit still produced a new npm-deps derivation, hence a new desktop
derivation, hence a full rebuild. Both filters have to move together.

Markdown scope

Markdown is excluded at the top level only (README, CHANGELOG, AGENTS...).
skills/*/SKILL.md is a runtime file both derivations copy into their output,
so a repository-wide *.md exclusion would silently ship empty skill
directories — the derivation hash test would not have caught that.

Verification

  • nix eval .#desktop.drvPath and .#paseo.drvPath are now unchanged across
    edits to docs/, .github/workflows/, docker/ and README.md; before this
    change both paths moved.
  • nix build .#desktop succeeds, and the output still contains all 5
    skills/*/SKILL.md files, with no docs/ or .github/ in the result.

@greptile-apps

greptile-apps Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Tightens both Nix source filters to prevent documentation and CI-only changes from invalidating daemon and desktop derivations.

  • Excludes documentation, workflow, Docker, and agent/editor configuration directories.
  • Excludes only top-level Markdown while preserving runtime Markdown under skills/.
  • Applies matching exclusions to the daemon source that supplies the desktop package’s npmDeps.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
nix/desktop-package.nix Excludes non-build inputs from the desktop source without removing nested runtime Markdown.
nix/package.nix Applies equivalent filtering to the daemon source so inherited desktop npm dependencies remain stable.

Reviews (2): Last reviewed commit: "fix(nix): keep docs and CI out of the de..." | Re-trigger Greptile

Both Nix derivations take the whole repository as `src` and exclude only a
handful of paths, so `docs/`, `.github/`, `docker/`, the agent/editor config
directories and the top-level markdown are all build inputs. None of them
reach the build, but any one of them changing produces a new derivation and
a full rebuild — including the Expo web export, which is the dominant cost —
to arrive at a byte-identical result.

The daemon's filter matters for the desktop package too, not just for the
daemon: desktop-package.nix inherits `npmDeps` from it, so a docs-only commit
gave a new npm-deps derivation, hence a new desktop derivation, hence a full
desktop rebuild even with the desktop filter tightened on its own.

Markdown is excluded at the top level only. skills/*/SKILL.md is a runtime
file both derivations copy into their output, so a repository-wide `*.md`
exclusion would silently ship empty skill directories.
@boudra
boudra force-pushed the nix-desktop-src-scope branch from 2d68e1c to d656162 Compare July 31, 2026 21:48
@boudra
boudra merged commit c0dcb44 into getpaseo:main Jul 31, 2026
21 checks passed
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.

2 participants