diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-11-08 16:03:42 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-11-08 16:03:42 +0100 |
commit | 2fde7e0108d70bcba64ebecc5e5c7ee2863e3446 (patch) | |
tree | 3cf91ee071ba96dbca851a695838ea2099ec0c96 /src/libstore/globals.hh | |
parent | 40911d7dec75541a400fe8f556d4c70a7f845fac (diff) |
Split auto UID allocation from cgroups
Cgroups are now only used for derivations that require the uid-range
range feature. This allows auto UID allocation even on systems that
don't have cgroups (like macOS).
Also, make things work on modern systems that use cgroups v2 (where
there is a single hierarchy and no "systemd" controller).
Diffstat (limited to 'src/libstore/globals.hh')
-rw-r--r-- | src/libstore/globals.hh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh index d3e86cc55..be741a830 100644 --- a/src/libstore/globals.hh +++ b/src/libstore/globals.hh @@ -46,6 +46,8 @@ struct PluginFilesSetting : public BaseSetting<Paths> void set(const std::string & str, bool append = false) override; }; +const uint32_t maxIdsPerBuild = 1 << 16; + class Settings : public Config { unsigned int getDefaultCores(); @@ -279,12 +281,10 @@ public: Setting<bool> autoAllocateUids{this, false, "auto-allocate-uids", "Whether to allocate UIDs for builders automatically."}; - const uint32_t idsPerBuild = 1 << 16; - Setting<uint32_t> startId{this, 872415232, "start-id", "The first UID and GID to use for dynamic ID allocation."}; - Setting<uint32_t> uidCount{this, idsPerBuild * 128, "id-count", + Setting<uint32_t> uidCount{this, maxIdsPerBuild * 128, "id-count", "The number of UIDs/GIDs to use for dynamic ID allocation."}; #endif |