-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
Description
Describe the bug
When ~/.local/share/nix/root is used as a chroot store, template's source is not found despite it being present in the store.
[root@tmp:~]# nix --extra-experimental-features 'flakes nix-command' flake init
error: '/home/orichard/.local/share/nix/root/nix/store/kgr2zyykdhyck7wx14x2pmnx0bl49hgs-source/trivial' was not found in the Nix store
If you've set 'defaultTemplate.path' to a string, try using a path instead.
[root@tmp:~]# ls /home/orichard/.local/share/nix/root/nix/store/kgr2zyykdhyck7wx14x2pmnx0bl49hgs-source/trivial
flake.nix
Steps To Reproduce
- Build nix-static to simplify test on machine without nix and nix store
nix build "github:NixOS/nix/0b62dab6db3da5b20e62697b14aaaf80f1a2eea6#packages.x86_64-linux.nix-static" - Copy `result/bin/nix on machine without nix
- On this machine execute
./nix --extra-experimental-features 'flakes nix-command' flake init
Expected behavior
Copy flake.nix from trivial template in current directory.
Tested with:
nix (Nix) 2.10.3
tuffnerdstuff