2024-04-14 08:58:16 +02:00
|
|
|
{ pkgs, config, ... }:
|
2023-09-03 12:09:45 +02:00
|
|
|
|
|
|
|
{
|
|
|
|
programs = {
|
|
|
|
carapace.enable = true;
|
|
|
|
nushell.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
nmt.script = let
|
2024-04-14 08:58:16 +02:00
|
|
|
configDir = if pkgs.stdenv.isDarwin && !config.xdg.enable then
|
2023-09-03 12:09:45 +02:00
|
|
|
"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'
|
|
|
|
'';
|
|
|
|
}
|