DeterminateSystems / nix-installer

Install Nix and flakes with the fast and reliable Determinate Nix Installer, with over 2 million installs.
GNU Lesser General Public License v2.1
2.01k stars 52 forks source link

Cannot run `nix develop` after Nix install #1069

Closed njlr closed 1 month ago

njlr commented 1 month ago

Running the steps in the guide fails:

$ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
# Success

$ nix version
nix (Nix) 2.23.3

$ echo "Hello Nix" | nix run "https://flakehub.com/f/NixOS/nixpkgs/*#ponysay"
# Success

$ mkdir nix-python-dev && cd nix-python-dev
# Success

$ nix develop
error: path '/nix/store/3ns5cb6yd6ygw8ls19q2sz0v273szr82-source/nix-python-dev/flake.nix' does not exist

Some more info:

$ cat /etc/nix/nix.conf
# Generated by https://github.com/DeterminateSystems/nix-installer.
# See `/nix/nix-installer --version` for the version details.

build-users-group = nixbld
experimental-features = nix-command flakes
auto-optimise-store = true
always-allow-substitutes = true
bash-prompt-prefix = (nix:$name)\040
max-jobs = auto
extra-nix-path = nixpkgs=flake:nixpkgs
upgrade-nix-store-path-url = https://install.determinate.systems/nix-upgrade/stable/universal
$ cat ~/.config/nix/nix.conf
No such file or directory

I am on Ubuntu:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.2 LTS
Release:    22.04
Codename:   jammy
njlr commented 1 month ago

I stumbled on this: https://www.reddit.com/r/NixOS/comments/1byap0t/comment/kyi4aa5/ and indeed git add flake.nix appears to fix it.

This is bizarre behavior IMO - why does Nix care about Git? :shrug: - but the installer did its job! :+1: