AMythicDev / minus

An asynchronous, runtime data feedable terminal paging library for Rust
https://crates.io/crates/minus/
Apache License 2.0
317 stars 23 forks source link

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

Closed TornaxO7 closed 6 months ago

TornaxO7 commented 6 months ago

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
AMythicDev commented 6 months ago

Hmmm...What command are you running exactly?

TornaxO7 commented 6 months ago

Hmmm...What command are you running exactly?

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

TornaxO7 commented 6 months ago

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

AMythicDev commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

Fine I am just merging this.