Help needed...installation instructions possibly outdated
totoroot opened this issue · comments
Hey there,
I tried following the installation instructions, since I was not confident enough to configure my system from scratch due to a lack of experience with Nix. My plan was to first get the system up and running and then customize it to better suit my needs but I already failed to get a working installation and need help.
I first yoinked a minimal image (20.09.2144.1d957fd0233) and booted. After successfully partitioning my drive I cloned my fork with all modifications for my host and updated the hardware-configuration. However I first had to install git with nix-env -iA nixos.git
.
Now when I tried running the installer I noticed that flakes weren't installed either:
error: unrecognised flag '--experimental-features'
So I added the channel and installed them with nix-env -iA nixpkgs.nixFlakes
.
After that, I could restart the installation process but it failed with something along the lines of:
access to path
/mnt/nix/store/ is forbidden in restricted mode.
With --show-trace
I got the following:
trace: while evaluating the attribute 'activationScript' of the derivation 'nixos-system-purple-21.03.20201030.fcc6849' at: (95:5) in file: /mnt/nix/store/<some-hash>-source/nixos/modules/system/activation/top-level.nix
I don't see what is wrong there...
name = "nixos-system-${config.system.nixos.label}";
Any ideas if my configuration causes it or if it has something to do with flakes having changed since the repo was last updated?
It seems like this issue is related but the workaround does not work on a read-only file-system like the one of the installer:
NixOS/nix#4081
Although it seems to have been fixed by now...
NixOS/nixpkgs#99493
Sorry if the issue is misplaced here and many thanks in advance!
this should work:
nix-shell -p nixUnstable
nix build /mnt/etc/nixos#nixosConfigurations.<HOSTNAME>.config.system.build.toplevel --experimental-features "flakes nix-command" --store "/mnt" --impure
# then install the build system...
nixos-install --root /mnt --system ./result
Thank you! Will try that next week and report back.
@benneti thanks! worked great.
Worked for me too, thank you very much!