Support running custom commands with login script

This commit is contained in:
Alexander Sosedkin 2019-03-09 18:14:48 +07:00
parent a5ab93eaec
commit 8629f29639

20
script
View file

@ -152,14 +152,18 @@ fi
echo "Sourcing home-manager environment..." echo "Sourcing home-manager environment..."
. "\$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" . "\$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
echo "Dropping you into a shell." if [ -z "$@" ]; then
echo "You can summon software from nixpkgs (e.g. gitMinimal) with:" echo "Dropping you into a shell."
echo " * nix run nixpkgs.gitMinimal" echo "You can summon software from nixpkgs (e.g. gitMinimal) with:"
echo " * nix-env -iA nixpkgs.gitMinimal" echo " * nix run nixpkgs.gitMinimal"
echo " * [edit ~/.config/nixpkgs/home.nix and run] home-manager switch" echo " * nix-env -iA nixpkgs.gitMinimal"
echo "or a myriad other ways." echo " * [edit ~/.config/nixpkgs/home.nix and run] home-manager switch"
echo "Happy hacking!" echo "or a myriad other ways."
exec /usr/bin/env bash "\$@" echo "Happy hacking!"
exec /usr/bin/env bash
else
exec /usr/bin/env "$@"
fi
EOF EOF
chmod +x bootstrap/bin/.login-inner chmod +x bootstrap/bin/.login-inner