diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2018-02-22 12:27:25 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2018-02-22 12:27:25 +0100 |
commit | ddc58e789636e1b94149c342575d92583251fbf6 (patch) | |
tree | 2b06967dda7120ca7e2c78716d711d399e9ad4a9 /src/libstore | |
parent | 6964131cd716b2ccf9d1f0a817b5cac483f87a9b (diff) |
Enable sandbox builds on Linux by default
The overhead of sandbox builds is a problem on NixOS (since building a
NixOS configuration involves a lot of small derivations) but not for
typical non-NixOS use cases. So outside of NixOS we can enable it.
Issue #179.
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/globals.hh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh index dd01f832d..12917a438 100644 --- a/src/libstore/globals.hh +++ b/src/libstore/globals.hh @@ -220,7 +220,13 @@ public: Setting<bool> enableNativeCode{this, false, "allow-unsafe-native-code-during-evaluation", "Whether builtin functions that allow executing native code should be enabled."}; - Setting<SandboxMode> sandboxMode{this, smDisabled, "sandbox", + Setting<SandboxMode> sandboxMode{this, + #if __linux__ + smEnabled + #else + smDisabled + #endif + , "sandbox", "Whether to enable sandboxed builds. Can be \"true\", \"false\" or \"relaxed\".", {"build-use-chroot", "build-use-sandbox"}}; |