[Nix-dev] nix-multi-user installation script

Peter Simons simons at cryp.to
Thu Nov 6 14:41:25 CET 2014


Hi Wout,

 >> The chroot build feature seems to require a statically linked bash.
 >
 > Not really - you just need to make sure all the libraries are in the
 > chroot. I would think that it just works on Linux, where everything is
 > linked only to /nix/store (unless the build got tainted).

it "just works" on NixOS, because the system auto-generates an appropriate
/etc/nix/nix.conf file that includes all bits required by "bash" into the
chroot environment. For example:

 | build-chroot-dirs = /bin/sh=/nix/store/j9z5...-bash-4.2-p51/bin/bash /nix/store/ghvr...-linux-headers-3.7.1 /nix/store/i11d...-glibc-2.19 /nix/store/j9z5...-bash-4.2-p51

On other Linux systems, this needs to be configured manually.

I hope this helps,
Peter



More information about the nix-dev mailing list