Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix: moving flake.nix and flake.lock back to root #135

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

TornaxO7
Copy link
Contributor

Looks like that it doesn't work (somehow it used to work on my pc?):

path '/home/tornax/Programming/minus' does not contain a 'flake.nix', searching up
error: path '/home/tornax/Programming/minus' is not part of a flake (neither it nor its parent directories contain a 'flake.nix' file)
direnv: export ~PATH

Verified

This commit was signed with the committer’s verified signature.
TornaxO7 TornaxO7
@AMythicDev
Copy link
Owner

Hmmm...What command are you running exactly?

@TornaxO7
Copy link
Contributor Author

Hmmm...What command are you running exactly?

Either none (since it gets automatically loaded) or nix develop.

@TornaxO7
Copy link
Contributor Author

It's really common that flake.nix and flake.lock exist in the root directory.

@AMythicDev
Copy link
Owner

AMythicDev commented Mar 15, 2024

Either none (since it gets automatically loaded)

Its because you left the .envrc file in the root dir. Put it in the nix dir and cd into it, I think that should do the trick.

or nix develop.

Just call nix develop in the nix dir. IIRC there's also a -f flag to set the path to flake.nix file.

It's really common that flake.nix and flake.lock exist in the root directory.

I have seen many projects putting all the nix stuff in a single nix dir :).

@TornaxO7
Copy link
Contributor Author

I have seen many projects putting all the nix stuff in a single nix dir :).

Huh, all? I'm aware of packaging and modules but I'm definetely sure that everyone puts at least flake.lock and flake.nix in the root directory.

Its because you left the .envrc file in the root dir. Put it in the nix dir and cd into it, I think that should do the trick.

That doesn't work because it unloads if I leave the nix directory.

Just call nix develop in the nix dir. IIRC there's also a -f flag to set the path to flake.nix file.

Not that I'm aware of and -f doesn't seem to exist for nix develop.

@AMythicDev AMythicDev merged commit 91b2033 into AMythicDev:main Mar 15, 2024
6 checks passed
@AMythicDev
Copy link
Owner

Fine I am just merging this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants