fix(installer): keep the cloned remote on HTTPS

A freshly installed machine has no key on Gitea, so the SSH remote the
installer set turned the first `git pull` into a password prompt.
This commit is contained in:
nevaforget committed 2026-08-20 14:36:08 +02:00
1 parent a5d6c3eb77
commit e366a3c256
1 file changed
+3 -2
+3 -2
View File
@@ -35,10 +35,11 @@ let
user=$(nix eval --raw "/etc/moonix#nixosConfigurations.$host.config.moonarch.user")
owner=$(awk -F: -v u="$user" '$1 == u { print $3 ":" $4 }' /mnt/etc/passwd)
# HTTPS, not SSH: a freshly installed machine has no key on Gitea, and an
# SSH remote would ask for a password on the first `git pull`. Switching
# the remote is a step for later, once a key exists — see README.
git clone https://gitea.moonarch.de/nevaforget/moonix.git \
"/mnt/home/$user/flakes/moonix"
git -C "/mnt/home/$user/flakes/moonix" remote set-url origin \
git@gitea.moonarch.de:nevaforget/moonix.git
chown -R "$owner" "/mnt/home/$user/flakes"
mkdir -p /mnt/etc/nixos