1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-24 12:09:46 +01:00
Commit graph

10 commits

Author SHA1 Message Date
K900
57e6b30d18
direnv: work around nushell bug
try/catch in a pipeline does not always work correctly in 0.98,
so avoid the try-catch entirely.

Upstream issue: https://github.com/nushell/nushell/issues/13868
2024-09-26 19:07:37 +02:00
K900
1e22ef1518
direnv: update for new nushell behavior (#5880)
Nushell 0.98 makes it so external commands returning non-zero
is considered an exception[0]. Wrap the direnv invocation in a
try-catch, so that even if direnv fails, we get the message
from direnv, but not the traceback from nushell.

[0]: https://www.nushell.sh/blog/2024-09-17-nushell_0_98_0.html#non-zero-exit-codes-are-now-errors-toc
2024-09-25 00:39:06 -06:00
Joaquín Triñanes
9fe79591c1
direnv: add nix-direnv to lib instead of sourcing
Also removes use of `with lib`.
2024-04-29 00:30:45 +02:00
Philipp Mildenberger
630a0992b3
nushell: fix nushell config path on darwin 2024-04-14 08:58:16 +02:00
Joaquín Triñanes
3bfaacf461
direnv: Make lines shorter 2023-12-21 00:00:17 +01:00
Joaquín Triñanes
67c4c05c29
direnv: Apply nushell env transformations
In nushell, the ENV_CONVERSIONS environment variable is used to
transform the defined variables from a string to a nushell value (PATH
to a list being one of the most common uses). This commit applies
user-defined conversions to direnv-loaded variables.

This fixes binary autocompletion not being triggered for newly added
paths and makes direnv work consistently with nushell
2023-12-21 00:00:16 +01:00
Mika Naylor
3ad22341a2
direnv: enable nushell integration
This enables nushell integration by default for direnv, similar to
bash/zsh/fish. The slightly verbose way of setting this is to ensure
that peoples' existing nushell configuration isn't overwritten, only
appended to, as would be the case if we just used the integration
example from the nushell docs:

  https://www.nushell.sh/cookbook/direnv.html

Closes #3520
2022-12-28 21:09:31 +01:00
Josh Holland
e0f2949c98
direnv: add enableFlakes option for enableNixDirenvIntegration (#2089)
NixOS/nixpkgs@03310df843 disabled flake
support by default, so we now need to build a custom package and use it
if the user wants to `use flake` successfully.  This should fix #2087.
2021-06-15 12:11:26 -04:00
Damien Cassou
b33802ca7f
direnv: add support for nix-direnv
PR #1297
2020-06-06 22:17:43 +02:00
Damien Cassou
575cd4b8ba
direnv: add initial test for bash integration 2020-06-06 21:40:41 +02:00