mirror of
https://github.com/nix-community/home-manager
synced 2024-11-11 05:39:44 +01:00
63d6e2de24
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
19 lines
485 B
Nix
19 lines
485 B
Nix
{ pkgs, ... }:
|
|
|
|
{
|
|
programs.nushell.enable = true;
|
|
programs.direnv.enable = true;
|
|
|
|
test.stubs.nushell = { };
|
|
|
|
nmt.script = let
|
|
configFile = if pkgs.stdenv.isDarwin then
|
|
"home-files/Library/Application Support/nushell/config.nu"
|
|
else
|
|
"home-files/.config/nushell/config.nu";
|
|
in ''
|
|
assertFileExists "${configFile}"
|
|
assertFileRegex "${configFile}" \
|
|
'let direnv = (/nix/store/.*direnv.*/bin/direnv export json \| from json | default {})'
|
|
'';
|
|
}
|