direnv tweak

This commit is contained in:
Nathan McCarty 2025-02-01 20:36:10 -05:00
parent 50103723ab
commit 9a3060a29f

View file

@ -21,23 +21,11 @@
mdbook mdbook
]; ];
programs = { programs = {
direnv.enable = true; # Direnv with nix-direnv integration for fatster, gc-rooted dev-shells
# Configure direnv with nushell direnv = {
nushell.extraConfig = '' enable = true;
$env.config = { enableNushellIntegration = true;
hooks: { nix-direnv.enable = true;
pre_prompt: [{ || };
if (which direnv | is-empty) {
return
}
direnv export json | from json | default {} | load-env
if 'ENV_CONVERSIONS' in $env and 'PATH' in $env.ENV_CONVERSIONS {
$env.PATH = do $env.ENV_CONVERSIONS.PATH.from_string $env.PATH
}
}]
}
}
'';
}; };
} }