Solvednixpkgs nixos-install fails with getting attributes of path /nix/store/...: No such file or directory

Describe the bug
during nixos-install a error appears getting attributes of path /nix/store/...: No such file or directory
the person who told me about this is @epsyle
i was using his dotfiles to test

i did this in a vm and he did it on hw

To Reproduce
Steps to reproduce the behavior:

  1. boot nixos-minimal-21.05.804.5de44c15758-x86_64-linux.iso
  2. create a root partition
  3. add fira-code in to your systemPackages
  4. nixos-install

Expected behavior
install should work


Additional context
after nix-build '<nixpkgs>' -A fira-code or nix-shell -p fira-code the install will continue until there's a another error of the same type which can be fixed by doing the same thing
nix-store --repair-path /nix/store/41qphrp1ksc1fqm01i7khs30n1zjl56r-fira-code-5.2 would fix it too

I hope this issue will help new people who are searching for a fix

Maybe related NixOS/nix#1281


  • system: "x86_64-linux"
  • host os: Linux 5.10.40, NixOS, 21.05.804.5de44c15758 (Okapi)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3.12
  • channels(root): "nixos-21.05.804.5de44c15758"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos
44 Answers

✔️Accepted Answer

a workaround by @jonringer

nix-build '<nixpkgs/nixos>' -A -I nixos-config=/mnt/etc/nixos/configuration.nix

let it complete
and then run sudo nixos-install

Other Answers:

Latest 21.05 ISOs should have all the fixes in them now.

@edolstra will a Nix 2.3.15 release be made soon enough? (before the end of the week)

Or should the patch be applied on 2.3.14 until then?

Given that this is a major blocker and tarnishes experience for new users, I think we should land a fix for this before the end of the week.

@samueldr I couldn’t replicate the exact issue, but I’m fairly confident that it would be fixed by NixOS/nix@89fba5c . Do you mind giving it a try?

More Issues: