Flakes: Difference between revisions
imported>Plredmond change the output schema to indicate that devShell requires a "<system>" sub attr, per https://github.com/edolstra/flake-compat/blob/99f1c2157fba4bfe6211a321fd0ee43199025dbf/default.nix#L185 |
imported>Jmatsushita Propose new section on setting bash-prompt for nix develop |
||
| Line 335: | Line 335: | ||
With the previous solution, direnv would only reload iff the flake.nix or flake.lock files have changed. This is not completely precise as the flake.nix file might import other files in the repository. | With the previous solution, direnv would only reload iff the flake.nix or flake.lock files have changed. This is not completely precise as the flake.nix file might import other files in the repository. | ||
==== Setting the bash prompt like nix-shell ==== | |||
A [https://github.com/NixOS/nix/pull/4189 new experimental feature of flakes] allow to setup a bash-prompt per flake: | |||
<syntaxHighlight lang=nix> | |||
{ | |||
description = "..."; | |||
nixConfig.bash-prompt = "\[nix-develop\]$ "; | |||
... | |||
} | |||
</syntaxHighlight> | |||
Otherwise it's also possible to set the `nix develop` 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 `nix.extraOptions`) | |||
== Pushing Flake inputs to Cachix == | == Pushing Flake inputs to Cachix == | ||