Conversation
5 of 8 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Allow Hjem standalone
switchandbuildcommands to resolve relative sourcepaths against an explicitly supplied source base directory.
The CLI adds
source_base_dirto the manifest produced from--configor--flake, then passes the resulting manifest through the existing Hjem andsmfh activation flow.
Motivation
Nix evaluation can describe a repository-relative source path, but it cannot
reliably discover the user's checkout location during pure evaluation. The
checkout path is therefore supplied at runtime by the standalone CLI.
This supports live files outside the Nix store:
Applications can modify the repository file directly, and the change remains
visible to version control without a separate capture step.
Scope
--source-base-dirto standaloneswitchandbuild.--configor--flake.--source-base-dirwith--manifest; a pre-generatedmanifest must contain its own
source_base_dir.behavior.
rollback.
Dependency
This change depends on the corresponding smfh change being merged first:
The Hjem CLI writes
source_base_dirinto the evaluated manifest, so thisfeature is not functional with an smfh version that does not understand that
manifest field. The Hjem PR can be merged after the Smfh PR is merged and
released.
Compatibility
Existing invocations without
--source-base-dirretain their currentbehavior. Existing absolute sources and targets are unchanged.
Validation
git diff --checkpass.Nix evaluates the standalone NixOS VM test derivation.NixOS derivation requires Linux.
Sanity Checking
nix flake check/nix-build -A checks)nix fmt/nix run -f . formatter)x86_64-linuxaarch64-linuxaarch64-darwinAdd a 👍 reaction to pull requests you find important.