[Nix-dev] Bootstrapping NixOS
Alexander Foremny
alexanderforemny at googlemail.com
Thu May 10 00:16:11 CEST 2012
Hello,
I am currently trying to bootstrap NixOS on my local machine in
attempt to do the same on a server I rent. However, following the
documentation I run into problems.
I downloaded nixos-install-archive.tar.bz2 [1], exported
$mountPoint=/mnt and then extracted the contents of the tarball to
/mnt.
# tar xjf nixos-install-archive.tar.bz2 -C /mnt
# export mountPoint=/mnt
Reading the README-BOOTSTRAP-NIXOS file, I executed the following command:
# bash /mnt/nix/store/nixos-prepare-install --dir-ok checkout-sources copy-nix
The script dies with the following error after SVN checkout.
> INFO: registering bootstrapping store paths as valid so that they won't be rebuild
> Couldn't read /proc/self/stat
> ./nix/store/nixos-prepare-install: Zeile 167: 8004 Aborted chroot "$mountPoint" /nix/store/kxdbs8kvkgsgzl2am1m9dm5hcikrndwh-nix-1.0pre26015/bin/nix-store --register-validity < $NIX_CLOSURE
I don't know if this is a critical error. I can read (cat) the file
/proc/self/stat just fine.
I am guessing this error is not critical so I tried to proceed. I
copied my configuration.nix to /mnt/etc/nixos/configuration.nix and
then executed the following command.
# LC_ALL=C bash /mnt/nix/store/run-in-chroot
"/nix/store/nixos-bootstrap --install --no-grub"
The following line indicates the error with which the script fails.
Before it just fetches MANIFEST.bz2 which appears to be successful.
>INFO: building the system configuration...
> error: syntax error, unexpected $undefined, expecting '}', at `/etc/nixos/nixos/default.nix:1:60'
These are the first three lines of /mnt/etc/nixos/nixos/default.nix.
Am I supposed to change anything in there? The literal string
"<nixos-config>" seems strange to me. However, I am not that
experienced with the Nix language.
> { configuration ? import ./lib/from-env.nix "NIXOS_CONFIG" <nixos-config>
> , system ? builtins.currentSystem
> }:
Any help would be appreciated.
Regards
Alexander Foremny
[1] http://hydra.nixos.org/build/920320
More information about the nix-dev
mailing list