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-direnv: make flakes support optional and off by default #126137

Merged
merged 1 commit into from
Jun 8, 2021

Conversation

lrworth
Copy link
Contributor

@lrworth lrworth commented Jun 8, 2021

Motivation for this change

Resolves nix-community/nix-direnv#89. nix-direnv depends on nixUnstable for flakes support, but that causes it to print a warning unless your user is trusted or the experimental-features setting is enabled. Neither of these are desirable (note that setting experimental-features in nix.conf causes warnings on nixStable).

Since flakes are experimental, this PR makes the default nixStable and optionally allows nixUnstable with a new flag enableFlakes, prioritising a good experience for users not using experimental features.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@lrworth lrworth changed the title Make flakes support optional and off by default nix-direnv: Make flakes support optional and off by default Jun 8, 2021
@lrworth lrworth changed the title nix-direnv: Make flakes support optional and off by default nix-direnv: make flakes support optional and off by default Jun 8, 2021
`nix-direnv` depends on `nixUnstable` for flakes support, but that
causes it to print a warning unless your user is trusted or the
`experimental-features` setting is enabled. Neither of these are
desirable (note that setting `experimental-features` in nix.conf causes
warnings on `nixStable`).

Since flakes are experimental, this commit makes `nixStable` the default
and optionally allows `nixUnstable` with a new flag `enableFlakes`,
prioritising a good experience for users not using experimental
features.
@github-actions
Copy link
Contributor

github-actions bot commented Jun 8, 2021

Successfully created backport PR #126176 for release-21.05.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 8, 2021

The process '/usr/bin/git' failed with exit code 1

@lrworth lrworth deleted the nix-direnv-configurable-flakes branch June 8, 2021 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--extra-experimental-features check passes when it is not allowed
2 participants