Skip to content

fix(flake): parenthesise the pointer activation script - #50

Merged
UnbreakableMJ merged 1 commit into
mainfrom
fix/pointer-activation-string
Aug 24, 2026
Merged

fix(flake): parenthesise the pointer activation script#50
UnbreakableMJ merged 1 commit into
mainfrom
fix/pointer-activation-string

Conversation

@UnbreakableMJ

Copy link
Copy Markdown
Contributor

#49 made the ~/.agents/skills link in the spacecraft-construct-skill-pointer activation entry conditional on perSkillLinks, by appending a lib.optionalString to the script. It appended it to the result of lib.hm.dag.entryAfter — a DAG entry set — rather than to the string inside it. Any consumer with mutablePointer.enable = true then fails to evaluate:

error: cannot coerce a set to a string: { after = «thunk»; before = [ ]; data = «thunk»; }

The two string literals now compose inside the entryAfter call.

Why CI did not catch it

This flake has no Home Manager input, so nix flake check never instantiates the module — it only checks the packages derivations and warns unknown flake output 'homeManagerModules'. The bug surfaced on the first real evaluation, from Bravais:

nix eval --raw --override-input construct path:/spacecraft-software/construct \
  '.#nixosConfigurations.bravais-thinkpad.config.home-manager.users.mj.home.activation.spacecraft-construct-per-skill-links.data'

Both activation entries render correctly with this fix: the pointer entry stops at …/construct/current (no ~/.agents/skills link, as intended under perSkillLinks), and the per-skill entry emits the link/prune loop with src=$HOME/.local/state/construct/current.

#49 made the ~/.agents/skills link in the pointer entry conditional by
appending a lib.optionalString to the activation script — but appended it to
the RESULT of lib.hm.dag.entryAfter, which is the DAG entry set, not the
script. Any consumer with mutablePointer on then failed to evaluate:

  error: cannot coerce a set to a string:
    { after = «thunk»; before = [ ]; data = «thunk»; }

The two string literals now compose inside the entryAfter call. Caught by
evaluating home.activation from a real Home Manager configuration; `nix flake
check` cannot see it, since this flake has no Home Manager to instantiate the
module against.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M94JK8t6zguGCTDP7udiUv
@UnbreakableMJ
UnbreakableMJ merged commit 86fb1b7 into main Aug 24, 2026
3 checks passed
@UnbreakableMJ
UnbreakableMJ deleted the fix/pointer-activation-string branch August 24, 2026 22:24
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