nixos/nix: Add support for running an unprivileged daemon#491809
Merged
Ericson2314 merged 2 commits intoNixOS:masterfrom Feb 23, 2026
Merged
nixos/nix: Add support for running an unprivileged daemon#491809Ericson2314 merged 2 commits intoNixOS:masterfrom
Ericson2314 merged 2 commits intoNixOS:masterfrom
Conversation
e1b89e2 to
ae286eb
Compare
33dc5ed to
0ae9a93
Compare
artemist
commented
Feb 19, 2026
0ae9a93 to
3d028fe
Compare
3d028fe to
795c26d
Compare
Ericson2314
approved these changes
Feb 23, 2026
Member
Ericson2314
left a comment
There was a problem hiding this comment.
This should be experimental at least as long as the underlying nix features as stable, but by that token, the barrier to merge should not be too high.
We're backporting this because want to use it in the preexisting test for this in the Nix repo --- that test is currently handrolling it downstream. Having it dogfooded upstream will make it more robust.
Contributor
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release-25.11
git worktree add -d .worktree/backport-491809-to-release-25.11 origin/release-25.11
cd .worktree/backport-491809-to-release-25.11
git switch --create backport-491809-to-release-25.11
git cherry-pick -x bd49e43206e92312906bb5a9e7a32157c3d9d3d1 795c26dca5d17874fc0a08899776f48b33e6cf4c |
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.
Things done
Upstream Nix recently added support for the features required to run an unprivileged nix. This PR adds support and a basic test for running nix unprivileged with full sandboxing.
This new configuration is based off those used in its VM test. If I have implemented this correctly there should be no actual nix changes if the daemon is running as root.
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.