mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 19:46:07 +01:00
If a shell is not started via login-inner (e.g. via ssh) it will not source the sessionInit script. The solution is to source this file in the respective config files for bash and zsh (more shell support can be easily added). The -u option is not necessary for the few lines in login-inner and should not be activated after sourcing sessionInit in bash or zsh setup.
32 lines
484 B
Nix
32 lines
484 B
Nix
# Copyright (c) 2019-2021, see AUTHORS. Licensed under MIT License, see LICENSE.
|
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
|
|
###### interface
|
|
|
|
options = {
|
|
|
|
};
|
|
|
|
|
|
###### implementation
|
|
|
|
config = {
|
|
|
|
environment.etc = {
|
|
"profile".text = ''
|
|
. "${config.build.sessionInit}/etc/profile.d/nix-on-droid-session-init.sh"
|
|
'';
|
|
|
|
"zshenv".text = ''
|
|
. "${config.build.sessionInit}/etc/profile.d/nix-on-droid-session-init.sh"
|
|
'';
|
|
};
|
|
|
|
};
|
|
|
|
}
|