1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-09-29 17:57:28 +02:00
home-manager/tests/modules/programs/direnv/nushell.nix
K900 57e6b30d18
direnv: work around nushell bug
try/catch in a pipeline does not always work correctly in 0.98,
so avoid the try-catch entirely.

Upstream issue: https://github.com/nushell/nushell/issues/13868
2024-09-26 19:07:37 +02:00

18 lines
466 B
Nix

{ pkgs, config, ... }:
{
programs.nushell.enable = true;
programs.direnv.enable = true;
test.stubs.nushell = { };
nmt.script = let
configFile = if pkgs.stdenv.isDarwin && !config.xdg.enable then
"home-files/Library/Application Support/nushell/config.nu"
else
"home-files/.config/nushell/config.nu";
in ''
assertFileExists "${configFile}"
assertFileRegex "${configFile}" '/nix/store/.*direnv.*/bin/direnv export json'
'';
}