Skip to content

Conversation

@cboecking
Copy link
Collaborator

This PR adds explicit path parameters to xs nu --install to support NixOS deployment scenarios where automatic path detection fails during activation scripts.

Changes

  • Added --lib-path parameter to specify exact location for xs.nu
  • Added --autoload-path parameter to specify exact location for xs-use.nu stub
  • Both parameters must be provided together when used
  • Maintains backward compatibility - automatic path detection works when no paths are provided

Use Case

In NixOS activation scripts, the automatic path detection fails with "Could not find writable install locations". With these new parameters, the activation script can explicitly specify where to install the files:

xs nu --install \
  --lib-path /root/.config/nushell/scripts/xs.nu \
  --autoload-path /usr/share/nushell/vendor/autoload/xs-use.nu

Testing

  • Compiles successfully
  • --help shows new parameters
  • Backward compatibility maintained (no parameters still works)

@cablehead cablehead merged commit 8cb20a0 into cablehead:main Nov 11, 2025
4 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