Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help needed...installation instructions possibly outdated #11

Closed
totoroot opened this issue Dec 4, 2020 · 5 comments
Closed

Help needed...installation instructions possibly outdated #11

totoroot opened this issue Dec 4, 2020 · 5 comments

Comments

@totoroot
Copy link
Contributor

totoroot commented Dec 4, 2020

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!

@benneti
Copy link

benneti commented Dec 5, 2020

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

@totoroot
Copy link
Contributor Author

totoroot commented Dec 5, 2020

Thank you! Will try that next week and report back.

@rphillips
Copy link

@benneti thanks! worked great.

@totoroot
Copy link
Contributor Author

Worked for me too, thank you very much!

@TheGoldMonkey
Copy link

TheGoldMonkey commented Oct 28, 2024

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

i almost bricked my system (couldnt chroot into my install from livecd) but these commands worked for recovering it :) im not even using these dotfiles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants