mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 19:49:45 +01:00
22 lines
635 B
Nix
22 lines
635 B
Nix
{ pkgs, config, ... }:
|
|
|
|
{
|
|
programs = {
|
|
carapace.enable = true;
|
|
nushell.enable = true;
|
|
};
|
|
|
|
nmt.script = let
|
|
configDir = if pkgs.stdenv.isDarwin && !config.xdg.enable 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'
|
|
'';
|
|
}
|