sudo -i nix-store --gc
but then i. e. nix shell --no-substitute --option binary-caches '' .#nixosConfigurations.DANIELKNB1.pkgs.hello
again gives:
error:
… while setting up the build environmenterror: getting attributes of path '/nix/store/w0cpwqkiim2b3cd8k0j5j1cz0s8kz87q-qemu-aarch64-binfmt-P-x86_64-unknown-linux-musl':
No such file or directory
and when I sudo -i nix-store --repair-path /nix/store/w0cpwqkiim2b3cd8k0j5j1cz0s8kz87q-qemu-aarch64-binfmt-P-x86_64-unknown-linux-musl
and then repeat nix shell --no-substitute --option binary-caches '' .#nixosConfigurations.DANIELKNB1.pkgs.hello
I get:
error:
… while setting up the build environmenterror: getting attributes of path '/run/binfmt': No such file or directory
and back to top of this gist...
Also:
wsl
thread 'main' panicked at src/shell_wrapper.rs:105:10:
calledResult::unwrap()
on anErr
value: When initializing journal loggerCaused by:
No such file or directory (os error 2)
note: run withRUST_BACKTRACE=1
environment variable to display a backtrace
But after complete system off / start nix shell .#nixosConfigurations.DANIELKNB1.pkgs.hello
works.
Still got that error from time to time:
this derivation will be built:
/nix/store/xhfd3k3y9288fb53ax6zpkcaa6aw69lw-setup.drv
error:
… while setting up the build environment
error: getting attributes of path '/nix/store/w0cpwqkiim2b3cd8k0j5j1cz0s8kz87q-qemu-aarch64-binfmt-P-x86_64-unknown-linux-musl':
No such file or directory
Even after PC restart it persisted, so I did:
sudo -i nix-store --repair-path /nix/store/w0cpwqkiim2b3cd8k0j5j1cz0s8kz87q-qemu-aarch64-binfmt-P-x86_64-unknown-linux-musl
Then it worked again:
nix run .#setup --show-trace -vv --builders '' -j2
Leave nixos-wsl vm
from admin pwsh run (https://stackoverflow.com/a/75408523):
taskkill /F /FI "IMAGENAME eq wsl.exe"
taskkill /F /FI "IMAGENAME eq wslhost.exe"
taskkill /F /FI "IMAGENAME eq wslservice.exe"
nixos-wsl vm should now work again