1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-27 12:19:48 +01:00
home-manager/tests/modules/programs/carapace/nushell.nix
2024-04-10 21:26:10 +02:00

22 lines
605 B
Nix

{ pkgs, ... }:
{
programs = {
carapace.enable = true;
nushell.enable = true;
};
nmt.script = let
configDir = if pkgs.stdenv.isDarwin then
"home-files/Library/Application Support/nushell"
else
"home-files/.config/nushell";
in ''
assertFileExists "${configDir}/env.nu"
assertFileRegex "${configDir}/env.nu" \
'/nix/store/.*carapace.*/bin/carapace _carapace nushell \| save -f \$"(\$carapace_cache)/init\.nu"'
assertFileExists "${configDir}/config.nu"
assertFileRegex "${configDir}/config.nu" \
'source /.*/\.cache/carapace/init\.nu'
'';
}