Closed totoroot closed 3 years ago
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!
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:I don't see what is wrong there...
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: https://github.com/NixOS/nix/issues/4081
Although it seems to have been fixed by now... https://github.com/NixOS/nixpkgs/pull/99493
Sorry if the issue is misplaced here and many thanks in advance!