1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-05 00:21:04 +01:00

Revert "direnv: update nushell env conversion logic (#6999)" (#7014)

This reverts commit f2b5bf55aa.
This commit is contained in:
Austin Horstman 2025-05-09 08:48:41 -05:00 committed by GitHub
parent b706037a60
commit e95a7c5b6f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -175,7 +175,6 @@ in
# Using mkAfter to make it more likely to appear after other # Using mkAfter to make it more likely to appear after other
# manipulations of the prompt. # manipulations of the prompt.
programs.nushell.extraConfig = mkIf cfg.enableNushellIntegration (mkAfter '' programs.nushell.extraConfig = mkIf cfg.enableNushellIntegration (mkAfter ''
use std/config env-conversions
$env.config = ($env.config? | default {}) $env.config = ($env.config? | default {})
$env.config.hooks = ($env.config.hooks? | default {}) $env.config.hooks = ($env.config.hooks? | default {})
$env.config.hooks.pre_prompt = ( $env.config.hooks.pre_prompt = (
@ -187,8 +186,8 @@ in
| default {} | default {}
| items {|key, value| | items {|key, value|
let value = do ( let value = do (
{ PATH: (env-conversions).path } $env.ENV_CONVERSIONS?
| merge ($env.ENV_CONVERSIONS? | default {}) | default {}
| get -i $key | get -i $key
| get -i from_string | get -i from_string
| default {|x| $x} | default {|x| $x}
@ -199,7 +198,6 @@ in
| load-env | load-env
} }
) )
hide env-conversions
''); '');
home.sessionVariables = lib.mkIf (cfg.silent && !isVersion236orHigher) { DIRENV_LOG_FORMAT = ""; }; home.sessionVariables = lib.mkIf (cfg.silent && !isVersion236orHigher) { DIRENV_LOG_FORMAT = ""; };