2024-04-14 08:58:16 +02:00
|
|
|
{ pkgs, config, ... }:
|
2023-11-15 10:44:42 +01:00
|
|
|
|
|
|
|
{
|
|
|
|
programs = {
|
|
|
|
nushell.enable = true;
|
|
|
|
|
|
|
|
oh-my-posh = {
|
|
|
|
enable = true;
|
|
|
|
useTheme = "jandedobbeleer";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
test.stubs = {
|
|
|
|
oh-my-posh = { };
|
|
|
|
nushell = { };
|
|
|
|
};
|
|
|
|
|
2023-12-28 23:07:47 +01:00
|
|
|
nmt.script = let
|
2024-04-14 08:58:16 +02:00
|
|
|
configFile = if pkgs.stdenv.isDarwin && !config.xdg.enable then
|
2023-12-28 23:07:47 +01:00
|
|
|
"home-files/Library/Application Support/nushell/config.nu"
|
|
|
|
else
|
|
|
|
"home-files/.config/nushell/config.nu";
|
|
|
|
|
2024-04-14 08:58:16 +02:00
|
|
|
envFile = if pkgs.stdenv.isDarwin && !config.xdg.enable then
|
2023-12-28 23:07:47 +01:00
|
|
|
"home-files/Library/Application Support/nushell/env.nu"
|
|
|
|
else
|
|
|
|
"home-files/.config/nushell/env.nu";
|
|
|
|
in ''
|
|
|
|
assertFileExists "${envFile}"
|
2023-11-15 10:44:42 +01:00
|
|
|
assertFileRegex \
|
2023-12-28 23:07:47 +01:00
|
|
|
"${envFile}" \
|
2023-11-15 10:44:42 +01:00
|
|
|
'/bin/oh-my-posh init nu --config .*--print \| save --force /.*/home-files/\.cache/oh-my-posh/init\.nu'
|
|
|
|
|
2023-12-28 23:07:47 +01:00
|
|
|
assertFileExists "${configFile}"
|
2023-11-15 10:44:42 +01:00
|
|
|
assertFileRegex \
|
2023-12-28 23:07:47 +01:00
|
|
|
"${configFile}" \
|
2023-11-15 10:44:42 +01:00
|
|
|
'source /.*/\.cache/oh-my-posh/init\.nu'
|
|
|
|
'';
|
|
|
|
}
|