Android : Update bash sourcing.

This commit is contained in:
Dmitry Voronin 2024-03-06 01:56:27 +03:00
parent 0de15a3d80
commit e7e7fea6ac
2 changed files with 11 additions and 9 deletions

View file

@ -42,14 +42,16 @@
home.stateVersion = const.droidStateVersion; home.stateVersion = const.droidStateVersion;
home.file = { home.file = {
".nixos".source = inputs.dotfiles; ".nixos".source = inputs.dotfiles;
".bash".source = ./common/bash;
".ssh/config".source = ./common/ssh/Config;
};
home.sessionVariables = {
BASH_MODULE_PATH = "$HOME/.bash/module";
BASH_PATH = "$HOME/.bash";
}; };
programs.bash = { programs.bash = {
enable = true; enable = true;
bashrcExtra = '' bashrcExtra = "source ~/.bash/Bashrc.sh";
for module in ~/.nixos/module/common/bash/module/*.sh; do
source ''${module}
done
'';
}; };
}; };
} }

View file

@ -1,7 +1,7 @@
{ environment, lib, ... }: { { environment, lib, ... }: {
environment.etc.bash.source = ./bash; environment.etc.bash.source = ./bash;
environment.shellAliases = lib.mkForce {}; environment.shellAliases = lib.mkForce {};
environment.variables.BASH_MODULE_PATH = "/etc/bash/module/"; environment.variables.BASH_MODULE_PATH = "/etc/bash/module";
environment.variables.BASH_PATH = "/etc/bash/"; environment.variables.BASH_PATH = "/etc/bash";
programs.bash.interactiveShellInit = "source /etc/bash/Bashrc.sh"; programs.bash.interactiveShellInit = "source /etc/bash/Bashrc.sh";
} }