mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
tests/dircolors: add nushell integration tests
This commit is contained in:
parent
38fbd8909e
commit
6c5025e2bb
2 changed files with 43 additions and 17 deletions
|
|
@ -1,7 +1,8 @@
|
||||||
{ pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
config = {
|
config = {
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
programs.nushell.enable = true;
|
||||||
|
|
||||||
programs.dircolors = {
|
programs.dircolors = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -17,7 +18,15 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script =
|
||||||
|
let
|
||||||
|
nushellConfigDir =
|
||||||
|
if pkgs.stdenv.isDarwin && !config.xdg.enable then
|
||||||
|
"home-files/Library/Application Support/nushell"
|
||||||
|
else
|
||||||
|
"home-files/.config/nushell";
|
||||||
|
in
|
||||||
|
''
|
||||||
assertFileContent \
|
assertFileContent \
|
||||||
home-files/.dir_colors \
|
home-files/.dir_colors \
|
||||||
${./settings-expected.conf}
|
${./settings-expected.conf}
|
||||||
|
|
@ -26,6 +35,10 @@
|
||||||
assertFileRegex \
|
assertFileRegex \
|
||||||
home-files/.zshrc \
|
home-files/.zshrc \
|
||||||
"eval \$(${pkgs.coreutils}/bin/dircolors -b ~/.dir_colors)"
|
"eval \$(${pkgs.coreutils}/bin/dircolors -b ~/.dir_colors)"
|
||||||
|
|
||||||
|
assertFileExists "${nushellConfigDir}/env.nu"
|
||||||
|
assertFileRegex "${nushellConfigDir}/env.nu" \
|
||||||
|
"source /nix/store/[^/]*-dircolors.nu"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
home.preferXdgDirectories = true;
|
home.preferXdgDirectories = true;
|
||||||
|
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
programs.nushell.enable = true;
|
||||||
|
|
||||||
programs.dircolors = {
|
programs.dircolors = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -19,7 +20,15 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script =
|
||||||
|
let
|
||||||
|
nushellConfigDir =
|
||||||
|
if pkgs.stdenv.isDarwin && !config.xdg.enable then
|
||||||
|
"home-files/Library/Application Support/nushell"
|
||||||
|
else
|
||||||
|
"home-files/.config/nushell";
|
||||||
|
in
|
||||||
|
''
|
||||||
assertFileContent \
|
assertFileContent \
|
||||||
home-files/.config/dir_colors \
|
home-files/.config/dir_colors \
|
||||||
${./settings-expected.conf}
|
${./settings-expected.conf}
|
||||||
|
|
@ -27,6 +36,10 @@
|
||||||
assertFileRegex \
|
assertFileRegex \
|
||||||
home-files/.zshrc \
|
home-files/.zshrc \
|
||||||
"eval \$(${pkgs.coreutils}/bin/dircolors -b ${config.xdg.configHome}/dir_colors)"
|
"eval \$(${pkgs.coreutils}/bin/dircolors -b ${config.xdg.configHome}/dir_colors)"
|
||||||
|
|
||||||
|
assertFileExists "${nushellConfigDir}/env.nu"
|
||||||
|
assertFileRegex "${nushellConfigDir}/env.nu" \
|
||||||
|
"source /nix/store/[^/]*-dircolors.nu"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue