mirror of
https://github.com/nix-community/home-manager
synced 2024-12-29 13:19:47 +01:00
b44f56dfcd
Previously the nushell module did not differentiate between Linux and Darwin when deciding where to place config files, whereas nushell does. This commit fixes that.
35 lines
651 B
Nix
35 lines
651 B
Nix
{ pkgs, ... }:
|
|
|
|
{
|
|
programs.nushell = {
|
|
enable = true;
|
|
|
|
configFile.text = ''
|
|
let $config = {
|
|
filesize_metric: false
|
|
table_mode: rounded
|
|
use_ls_colors: true
|
|
}
|
|
'';
|
|
|
|
envFile.text = ''
|
|
let-env FOO = 'BAR'
|
|
'';
|
|
};
|
|
|
|
test.stubs.nushell = { };
|
|
|
|
nmt.script = let
|
|
configDir = if pkgs.stdenv.isDarwin then
|
|
"home-files/Library/Application Support/nushell"
|
|
else
|
|
"home-files/.config/nushell";
|
|
in ''
|
|
assertFileContent \
|
|
"${configDir}/config.nu" \
|
|
${./config-expected.nu}
|
|
assertFileContent \
|
|
"${configDir}/env.nu" \
|
|
${./env-expected.nu}
|
|
'';
|
|
}
|