Skip to content

Commit

Permalink
nixos/nix-daemon: default nix.useSandbox to true.
Browse files Browse the repository at this point in the history
  • Loading branch information
andir committed Jul 29, 2018
1 parent 6dd7ddd commit 4f6df27
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion nixos/doc/manual/release-notes/rl-1809.xml
Expand Up @@ -370,7 +370,9 @@ inherit (pkgs.nixos {
<varname>s6-dns</varname>, <varname>s6-networking</varname>,
<varname>s6-linux-utils</varname> and <varname>s6-portable-utils</varname> respectively.
</para>
</listitem>
</listitem>
<listitem>
<para>The module option <option>nix.useSandbox</option> is now defaulted to <literal>true</literal>.
</itemizedlist>
</section>
</section>
10 changes: 5 additions & 5 deletions nixos/modules/services/misc/nix-daemon.nix
Expand Up @@ -127,16 +127,16 @@ in

useSandbox = mkOption {
type = types.either types.bool (types.enum ["relaxed"]);
default = false;
default = true;
description = "
If set, Nix will perform builds in a sandboxed environment that it
will set up automatically for each build. This prevents impurities
in builds by disallowing access to dependencies outside of the Nix
store by using network and mount namespaces in a chroot environment.
This isn't enabled by default for possible performance impacts due to
the initial setup time of a sandbox for each build. It doesn't affect
derivation hashes, so changing this option will not trigger a rebuild
of packages.
This is enabled by default even though it has a possible performance
impact due to the initial setup time of a sandbox for each build. It
doesn't affect derivation hashes, so changing this option will not
trigger a rebuild of packages.
";
};

Expand Down

0 comments on commit 4f6df27

Please sign in to comment.