direnv tweak
This commit is contained in:
parent
50103723ab
commit
9a3060a29f
1 changed files with 6 additions and 18 deletions
|
@ -21,23 +21,11 @@
|
|||
mdbook
|
||||
];
|
||||
programs = {
|
||||
direnv.enable = true;
|
||||
# Configure direnv with nushell
|
||||
nushell.extraConfig = ''
|
||||
$env.config = {
|
||||
hooks: {
|
||||
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
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
'';
|
||||
# Direnv with nix-direnv integration for fatster, gc-rooted dev-shells
|
||||
direnv = {
|
||||
enable = true;
|
||||
enableNushellIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue