From 10e8a801b6971025ff5a14cebe4566dddf5cbf70 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 7 Mar 2011 08:20:24 +0000 Subject: [PATCH] * Refactor: extraChrootPaths -> chrootDirs. This allows disabling the default chroot paths using mkOverride. svn path=/nixos/trunk/; revision=26183 --- modules/services/misc/nix-daemon.nix | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/modules/services/misc/nix-daemon.nix b/modules/services/misc/nix-daemon.nix index aa4947adad6d..842ba0b88ba2 100644 --- a/modules/services/misc/nix-daemon.nix +++ b/modules/services/misc/nix-daemon.nix @@ -59,6 +59,16 @@ in "; }; + chrootDirs = mkOption { + default = []; + example = [ "/dev" "/proc" ]; + description = + '' + Directories from the host filesystem to be included + in the chroot. + ''; + }; + extraOptions = mkOption { default = ""; example = " @@ -70,16 +80,6 @@ in "; }; - 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; description = " @@ -194,6 +194,8 @@ in config = { + nix.chrootDirs = [ "/dev" "/dev/pts" "/proc" "/bin" ]; + environment.etc = [ { # Nix configuration. source = @@ -220,7 +222,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) ${builtins.toString config.nix.extraChrootPaths} + build-chroot-dirs = ${toString config.nix.chrootDirs} $(echo $extraPaths) $extraOptions END '';