I ran into an error which I do not know how to rectify with my limited Nix experience. I did google the issue but the solutions are all a couple of years old.
I updated my laptop to 21.11 but during the process, my laptop when into hibernation mode because I was not plugged in (old computer + old battery). The laptop went into hibernation mode before I was able to grab my power cord and plug it in. When the laptop restarted, the update continue without any obvious issues. But now I cannot update my applications:
[root@nixos:/home/sandor]# nix-env --upgrade
error: syntax error, unexpected end of file, at /nix/store/7lcwp9xjs0hng1l03ivszzy50dkxqabi-env-manifest.nix:1:1
My searches did lead me to a possible solution, but:
nix-store --verify --repair --check-contents
reading the Nix store...
checking path existence...
checking hashes...
path '/nix/store/7lcwp9xjs0hng1l03ivszzy50dkxqabi-env-manifest.nix' was modified! expected hash 'sha256:0vl1j32mvgy14yvmvh8q3wp3ssxw8ngfpvxrw213vk4grkf1cz7h', got 'sha256:0ip26j2h11n1kgkz36rl4akv694yz65hr72q4kv4b3lxcbi65b3p'
error: cannot repair path '/nix/store/7lcwp9xjs0hng1l03ivszzy50dkxqabi-env-manifest.nix'
path '/nix/store/dckz5xzsm464scr5ilxm5akgm64kx6xv-user-environment.drv' was modified! expected hash 'sha256:11r2c7bkpfa1klkghrrc6p64y2g1m8nssfk9ba5h9nyk5qwgavb9', got 'sha256:0ip26j2h11n1kgkz36rl4akv694yz65hr72q4kv4b3lxcbi65b3p'
error: cannot repair path '/nix/store/dckz5xzsm464scr5ilxm5akgm64kx6xv-user-environment.drv'
warning: not all errors were fixed
Rolling back is not possible - I have a habit of cleaning (nix-collect-garbage -d) out prior versions when I see everything working correctly. Unfortunately, I think learned my lesson in doing this so soon after updating.
I know I could rebuild this laptop within a couple of hours but is there a better route?
Thank you in advance for teaching me more about Nix.