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

Fix Nix file order docs #407

Merged
merged 1 commit into from
Nov 18, 2023
Merged

Fix Nix file order docs #407

merged 1 commit into from
Nov 18, 2023

Conversation

infinisil
Copy link
Contributor

shell.nix file is used first if it exists, see

nix-direnv/direnvrc

Lines 340 to 344 in 9178f71

if [[ -e "shell.nix" ]]; then
nixfile="./shell.nix"
elif [[ -e "default.nix" ]]; then
nixfile="./default.nix"
fi

shell.nix file is used first if it exists
@infinisil
Copy link
Contributor Author

Though ideally it would also use default.nix if it exists, a lot of shell.nix's just defer to default.nix

@Mic92 Mic92 merged commit 5c941b9 into nix-community:master Nov 18, 2023
9 checks passed
@Mic92
Copy link
Member

Mic92 commented Nov 18, 2023

Thanks!

@Mic92
Copy link
Member

Mic92 commented Nov 18, 2023

Though ideally it would also use default.nix if it exists, a lot of shell.nix's just defer to default.nix

We need to stay compatible with use nix from the direnv stdlib instead. So this is not an option.

@infinisil
Copy link
Contributor Author

infinisil commented Nov 18, 2023

Ah, I guess yeah the default file to load should stay the same, but I think both files should be watched for changes by default.

@infinisil
Copy link
Contributor Author

Opened #409 to track this further

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