Flakes: Difference between revisions

imported>Mic92
unstable installer is no longer necessary.
imported>R-k-b
Direnv integration: Let readers know manually copying the use_flake function may no longer be necessary
Line 366: Line 366:
Copy this in <code>~/.config/direnv/lib/use_flake.sh</code> or in <code>~/.config/direnv/direnvrc</code>
Copy this in <code>~/.config/direnv/lib/use_flake.sh</code> or in <code>~/.config/direnv/direnvrc</code>
or directly in your project specific <code>.envrc</code>.
or directly in your project specific <code>.envrc</code>.
Note: You may not need to create <code>use_flake()</code> yourself; as of [https://github.com/direnv/direnv/releases/tag/v2.29.0#:~:text=add%20use_flake%20function direnv 2.29,] <code>use flake</code> is part of direnv's standard library.


With this in place, you can now replace the use nix invocation in the <code>.envrc</code> file with <code>use flake</code>:
With this in place, you can now replace the use nix invocation in the <code>.envrc</code> file with <code>use flake</code>:
Line 393: Line 395:
</syntaxHighlight>
</syntaxHighlight>


Otherwise it's also possible to set the <code>nix develop</code> bash prompt system wide using the [https://nixos.org/manual/nix/unstable/command-ref/conf-file.html nix.conf option bash-prompt]. (On nixos I think it is set in <code>nix.extraOptions</code>)  
Otherwise it's also possible to set the <code>nix develop</code> bash prompt system wide using the [https://nixos.org/manual/nix/unstable/command-ref/conf-file.html nix.conf option bash-prompt]. (On nixos I think it is set in <code>nix.extraOptions</code>)


== Pushing Flakes to Cachix ==
== Pushing Flakes to Cachix ==