Create /etc/static/shells symlink for NixOS hosts - #5
Merged
Merged
Conversation
On NixOS, the host's /etc/shells is itself a symlink to /etc/static/shells. When this manifest's own /etc/shells is symlinked to /var/run/host/etc/shells, resolving that second hop fails with ENOENT: absolute symlink targets resolve against the sandbox's own root, not /var/run/host, and the sandbox has no /etc/static/shells. Mirroring the existing /etc/shells symlink pattern for /etc/static/shells fixes it, letting VS Code's shell-profile detection work again. Cherry-picked from flathub#428, using the fix a reviewer suggested there (a conditional symlink to the host's real file) instead of the PR's own approach (an unconditional hardcoded sh/bash fallback for every user, NixOS or not), which is why that PR was never merged despite being open since 2023. Co-Authored-By: Claude Sonnet 5 <[email protected]>
francoism90
had a problem deploying
to
github-pages
September 10, 2026 14:02 — with
GitHub Actions
Failure
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
/etc/shellsis a symlink to/etc/static/shells. This manifest already symlinks the sandbox's/etc/shellsto/var/run/host/etc/shells, but that second hop resolves against the sandbox's own root (not/var/run/host), and the sandbox has no/etc/static/shells— so it 404s withENOENT: no such file or directory, open '/etc/shells', breakingterminal.integrated.defaultProfile.linuxdetection./etc/static/shellsthe same way, conditional on it existing on the host, so non-NixOS hosts are unaffected.Cherry-picked from flathub/com.visualstudio.code#428, but using the fix a reviewer suggested there (a conditional symlink to the host's real file) instead of the PR's own approach (an unconditional hardcoded
sh/bashfallback written for every user, NixOS or not) — likely why that PR was never merged despite being open since 2023.Test plan
/etc/shellsresolves inside the sandbox and the integrated terminal'sbashprofile works/etc/static/shellsis not created (the[ -e /var/run/host/etc/static/shells ]check should be false)