Skip to content

Commit

Permalink
Adding a possibility to add more paths to chroots used by nix-daemons…
Browse files Browse the repository at this point in the history
…. The use-case is building the latest version from repository with very large checkouts. That way you do not get extra copy in store every time you rebuild, and you can implement a saner version checking than checksumming all the data

svn path=/nixos/trunk/; revision=26174
  • Loading branch information
7c6f434c committed Mar 6, 2011
1 parent 0c6129b commit 00f3a81
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions modules/services/misc/nix-daemon.nix
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ in
This option allows to append lines to nix.conf.
";
};

extraChrootPaths = mkOption {
default = [];
example = ["/var/dist"];
description = ''
Extra paths to include in chroot. May be useful if you build
from private repository mirrors to avoid extra checksumming
and copying to store.
'';
};

distributedBuilds = mkOption {
default = false;
Expand Down Expand Up @@ -176,7 +186,6 @@ in
you should increase this value.
'';
};

};
};

Expand Down Expand Up @@ -211,7 +220,7 @@ in
build-users-group = nixbld
build-max-jobs = ${toString (config.nix.maxJobs)}
build-use-chroot = ${if config.nix.useChroot then "true" else "false"}
build-chroot-dirs = /dev /dev/pts /proc /bin $(echo $extraPaths)
build-chroot-dirs = /dev /dev/pts /proc /bin $(echo $extraPaths) ${builtins.toString config.nix.extraChrootPaths}
$extraOptions
END
'';
Expand Down

0 comments on commit 00f3a81

Please sign in to comment.