You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to put flake.nix and co into a sub-dir of my git repo. This works fine but now I have to explicitly list the subdir when trying to use nix (flake check, develop, build, ...) and I'd rather not, not unlike if I was in a subdir and nix searches up for me already.
Proposed solution
Look into NIX_FLAKE_PATH env var and fall back to fs::current_path(). I have a quick patch that worked for nix flake check and nix flake show. I haven't tried to extend to nix develop or nix build (not sure how it could even work for nix build tbh). And so I thought to ask if there's an appetite for a PR for this.
Is your feature request related to a problem?
Not really.
I'd like to put flake.nix and co into a sub-dir of my git repo. This works fine but now I have to explicitly list the subdir when trying to use nix (flake check, develop, build, ...) and I'd rather not, not unlike if I was in a subdir and nix searches up for me already.
Proposed solution
Look into
NIX_FLAKE_PATH
env var and fall back tofs::current_path()
. I have a quick patch that worked fornix flake check
andnix flake show
. I haven't tried to extend tonix develop
ornix build
(not sure how it could even work for nix build tbh). And so I thought to ask if there's an appetite for a PR for this.Alternative solutions
Haven't thought of any except continuing with the status quo of using relative path in nix cli invocations.
Additional context
Checklist
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: