Skip to content

Commit ca426dd

Browse files
committed
commit for ci build
1 parent 5a4e669 commit ca426dd

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

nix_test_env/docker_entrypoint.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ else
1313
echo "Warning: /root/.nix-profile/etc/profile.d/nix.sh not found. Nix environment may not be fully set up."
1414
fi
1515

16+
# Run home-manager switch if home-manager is available
17+
if command -v home-manager &>/dev/null; then
18+
echo "Running home-manager switch..."
19+
home-manager switch || echo "home-manager switch failed."
20+
else
21+
echo "Warning: home-manager not found. Skipping home-manager switch."
22+
fi
23+
1624
# Source hm-session-vars.sh if it exists (for home-manager)
1725
if [ -f "/root/.nix-profile/etc/profile.d/hm-session-vars.sh" ]; then
1826
echo "Sourcing /root/.nix-profile/etc/profile.d/hm-session-vars.sh"
@@ -24,14 +32,6 @@ fi
2432
# Ensure Nix binaries are in PATH for subsequent commands
2533
export PATH="/root/.nix-profile/bin:/root/.nix-profile/sbin:${PATH}"
2634

27-
# Run home-manager switch if home-manager is available
28-
if command -v home-manager &>/dev/null; then
29-
echo "Running home-manager switch..."
30-
home-manager switch || echo "home-manager switch failed."
31-
else
32-
echo "Warning: home-manager not found. Skipping home-manager switch."
33-
fi
34-
3535
# If no arguments are provided, keep the container running
3636
if [[ $# -eq 0 ]]; then
3737
echo "No command provided, keeping container alive..."

0 commit comments

Comments
 (0)