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

Different folder for niv init #102

Closed
masaeedu opened this issue Jun 19, 2019 · 3 comments · Fixed by #159
Closed

Different folder for niv init #102

masaeedu opened this issue Jun 19, 2019 · 3 comments · Fixed by #159

Comments

@masaeedu
Copy link

Might be a little late for this, but I'd prefer it if all my niv stuff went into .niv instead of nix. I was wondering if there's a way to make this configurable and still have everything work?

@masaeedu masaeedu changed the title Different folder Different folder for niv init Jun 19, 2019
@nmattia
Copy link
Owner

nmattia commented Jun 19, 2019

Here’s something that could work well:

  • by default niv looks first in nix/, then in .niv/
  • on niv init you can specify —sources-dir

Thoughts ?

@masaeedu
Copy link
Author

@nmattia That seems like a good idea. Regarding sources-dir: would it only support the values nix and .niv, or would it store any value you give it in some config file and then refer to it later?

@masaeedu
Copy link
Author

masaeedu commented Jun 19, 2019

Maybe another alternative is that niv init works how it always did, but also creates a .nivrc config file in the root of the repo with all the default settings (e.g. "sources-dir": "/nix"). If you pass any flags or environment variables to override those settings, that's what shows up in the .nivrc config file on niv init. All the other commands simply refer to this config file to find the answers to all configurable questions.

Finally, if the .nivrc file is not present all the commands fall back to some default hardcoded niv config that makes the tool work how it used to.

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 a pull request may close this issue.

2 participants