diff --git a/modules/services/misc/nix-daemon.nix b/modules/services/misc/nix-daemon.nix index d3acc625a8b2..f28a793aefc6 100644 --- a/modules/services/misc/nix-daemon.nix +++ b/modules/services/misc/nix-daemon.nix @@ -29,12 +29,10 @@ let # other paths in the store, we need the closure of /bin/sh # in `build-chroot-dirs' - otherwise any builder that uses # /bin/sh won't work. - closureFile = pkgs.runCommand "closure" { - exportReferencesGraph = concatMap (pkg: [ "closure${baseNameOf pkg}" pkg ]) cfg.chrootClosures; - } "cat closure* | sort | uniq > $out"; + binshDeps = pkgs.writeReferencesToFile config.system.build.binsh; in pkgs.runCommand "nix.conf" {extraOptions = cfg.extraOptions; } '' - extraPaths=$(for i in $(cat ${closureFile}); do if test -e $i; then echo $i; fi; done) + extraPaths=$(for i in $(cat ${binshDeps}); do if test -d $i; then echo $i; fi; done) cat > $out <