nushell: expose config dir location as option
This commit is contained in:
parent
b47ea12ff4
commit
363007f129
3 changed files with 56 additions and 11 deletions
30
tests/modules/programs/nushell/config-dir.nix
Normal file
30
tests/modules/programs/nushell/config-dir.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
programs.nushell = {
|
||||
enable = true;
|
||||
configDir = "${config.xdg.configHome}/nushell-alt-path";
|
||||
extraConfig = ''
|
||||
# extra config
|
||||
'';
|
||||
extraEnv = ''
|
||||
# extra env
|
||||
'';
|
||||
extraLogin = ''
|
||||
# extra login
|
||||
'';
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertDirectoryExists home-files/.config/nushell-alt-path
|
||||
|
||||
assertFileExists home-files/.config/nushell-alt-path/config.nu
|
||||
assertFileRegex home-files/.config/nushell-alt-path/config.nu '# extra config'
|
||||
|
||||
assertFileExists home-files/.config/nushell-alt-path/env.nu
|
||||
assertFileRegex home-files/.config/nushell-alt-path/env.nu "# extra env"
|
||||
|
||||
assertFileExists home-files/.config/nushell-alt-path/login.nu
|
||||
assertFileRegex home-files/.config/nushell-alt-path/login.nu '# extra login'
|
||||
|
||||
'';
|
||||
}
|
||||
|
|
@ -1 +1,4 @@
|
|||
{ nushell-example-settings = ./example-settings.nix; }
|
||||
{
|
||||
nushell-example-settings = ./example-settings.nix;
|
||||
nushell-config-dir = ./config-dir.nix;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue