mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 19:46:07 +01:00
login-inner: source session-init on initial build
This commit is contained in:
parent
ad7345897f
commit
eb2f3bca34
1 changed files with 6 additions and 4 deletions
|
|
@ -4,6 +4,11 @@
|
|||
|
||||
let
|
||||
inherit (customPkgs.packageInfo) cacert coreutils nix;
|
||||
|
||||
sessionInitPackage =
|
||||
if config.build.initialBuild
|
||||
then config.build.sessionInit
|
||||
else "/nix/var/nix/profiles/per-user/${config.user.userName}/profile";
|
||||
in
|
||||
|
||||
writeText "login-inner" ''
|
||||
|
|
@ -16,12 +21,9 @@ writeText "login-inner" ''
|
|||
[ "$#" -gt 0 ] || echo "If nothing works, use the rescue shell and read ${config.build.installationDir}/usr/lib/login-inner"
|
||||
[ "$#" -gt 0 ] || echo "If it does not help, report bugs at https://github.com/t184256/nix-on-droid-bootstrap/issues"
|
||||
|
||||
${lib.optionalString (! config.build.initialBuild) ''
|
||||
set +u
|
||||
. "/nix/var/nix/profiles/per-user/$USER/profile/etc/profile.d/nix-on-droid-session-init.sh"
|
||||
. "${sessionInitPackage}/etc/profile.d/nix-on-droid-session-init.sh"
|
||||
set -u
|
||||
''
|
||||
}
|
||||
|
||||
${lib.optionalString config.build.initialBuild ''
|
||||
if [ -e /etc/UNINTIALISED ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue