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
|
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
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue