aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/globals.hh
diff options
context:
space:
mode:
authorNaïm Favier <n@monade.li>2022-12-14 00:40:30 +0100
committerNaïm Favier <n@monade.li>2022-12-14 00:40:30 +0100
commit1f3c0a3c1dde7e0348c085e0fbb60729cb067d86 (patch)
tree1034aa9928cba2f2116c1a6e98d19d5daf175c21 /src/libstore/globals.hh
parent9fa8b02c415808f072e2365b76101d9f839d8698 (diff)
Allow disabling build users by unsetting `build-users-group`
Unsetting `build-users-group` (without `auto-allocate-uids` enabled) gives the following error: ``` src/libstore/lock.cc:25: static std::unique_ptr<nix::UserLock> nix::SimpleUserLock::acquire(): Assertion `settings.buildUsersGroup != ""' failed. ``` Fix the logic in `useBuildUsers` and document the default value for `build-users-group`.
Diffstat (limited to 'src/libstore/globals.hh')
-rw-r--r--src/libstore/globals.hh5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh
index 54a5d0fc7..274a15dd7 100644
--- a/src/libstore/globals.hh
+++ b/src/libstore/globals.hh
@@ -281,7 +281,10 @@ public:
`NIX_REMOTE` is empty, the uid under which the Nix daemon runs if
`NIX_REMOTE` is `daemon`). Obviously, this should not be used in
multi-user settings with untrusted users.
- )"};
+
+ Defaults to `nixbld` when running as root, *empty* otherwise.
+ )",
+ {}, false};
Setting<bool> autoAllocateUids{this, false, "auto-allocate-uids",
R"(