2022-11-23 23:37:08 +00:00
|
|
|
{ pkgs, ... }:
|
2022-05-13 15:20:42 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
programs.nushell = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
configFile.text = ''
|
|
|
|
let $config = {
|
|
|
|
filesize_metric: false
|
|
|
|
table_mode: rounded
|
|
|
|
use_ls_colors: true
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
|
|
|
|
envFile.text = ''
|
|
|
|
let-env FOO = 'BAR'
|
|
|
|
'';
|
2022-12-27 16:29:16 +00:00
|
|
|
|
|
|
|
shellAliases = {
|
|
|
|
"lsname" = "(ls | get name)";
|
|
|
|
"ll" = "ls -a";
|
|
|
|
};
|
2023-05-03 22:12:21 +00:00
|
|
|
|
|
|
|
environmentVariables = { BAR = "$'(echo BAZ)'"; };
|
2022-05-13 15:20:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
test.stubs.nushell = { };
|
|
|
|
|
2022-11-23 23:37:08 +00:00
|
|
|
nmt.script = let
|
|
|
|
configDir = if pkgs.stdenv.isDarwin then
|
|
|
|
"home-files/Library/Application Support/nushell"
|
|
|
|
else
|
|
|
|
"home-files/.config/nushell";
|
|
|
|
in ''
|
2022-05-13 15:20:42 +00:00
|
|
|
assertFileContent \
|
2022-11-23 23:37:08 +00:00
|
|
|
"${configDir}/config.nu" \
|
2022-05-13 15:20:42 +00:00
|
|
|
${./config-expected.nu}
|
|
|
|
assertFileContent \
|
2022-11-23 23:37:08 +00:00
|
|
|
"${configDir}/env.nu" \
|
2022-05-13 15:20:42 +00:00
|
|
|
${./env-expected.nu}
|
|
|
|
'';
|
|
|
|
}
|