From 0afab193098aa928121305be8a047b8367e71831 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Numbus?= Date: Mon, 2 Feb 2026 20:44:35 +0100 Subject: [PATCH] Fixed missing activation scripts. Made activation script more robust. Fixed SSH not working because wrong IP. --- deploy.sh | 1 + templates/nix-config/configuration.nix | 1 + templates/nix-config/misc/activation.nix | 7 +++++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/deploy.sh b/deploy.sh index 5cf78b9..e7e2a64 100644 --- a/deploy.sh +++ b/deploy.sh @@ -843,6 +843,7 @@ deploy() { postrun_action() { TARGET_USER="numbus-admin" + TARGET_HOST="${HOME_SERVER_IP}" REMOTE_PASS="changeMe!" echo -e "\n\n Now the remote machine will reboot. You will need to input the boot disk(s) passphrase. diff --git a/templates/nix-config/configuration.nix b/templates/nix-config/configuration.nix index f4cf75f..1ee6b21 100644 --- a/templates/nix-config/configuration.nix +++ b/templates/nix-config/configuration.nix @@ -6,6 +6,7 @@ (modulesPath + "/profiles/qemu-guest.nix") inputs.sops-nix.nixosModules.sops ./disks/disko.nix + ./misc/activation.nix ./misc/mail.nix ./misc/networking.nix ./misc/smart.nix diff --git a/templates/nix-config/misc/activation.nix b/templates/nix-config/misc/activation.nix index 7607af5..2dc5273 100644 --- a/templates/nix-config/misc/activation.nix +++ b/templates/nix-config/misc/activation.nix @@ -69,6 +69,7 @@ PODMAN_NETWORKS }; script = '' #!/usr/bin/env bash + set -euo pipefail if [[ -e /home/numbus-admin/.numbus-server/quirked.true ]]; then exit 0 @@ -86,12 +87,13 @@ PODMAN_NETWORKS fi if [[ ! -e /etc/nixos/podman/home-assistant.nix ]]; then + mkdir -p /mnt/config/home-assistant/ until [[ -e /mnt/config/home-assistant/configuration.yaml ]]; do echo "Waiting for Home Assistant to be ready..." sleep 15 done sleep 180 - systemctl stop frigate.service + systemctl stop home-assistant.service cat << 'EOF' >> /mnt/config/home-assistant/configuration.yaml http: @@ -105,6 +107,7 @@ EOF fi if [[ ! -e /etc/nixos/podman/frigate.nix ]]; then + mkdir -p /mnt/config/frigate/ until [[ -e /mnt/config/frigate/config.yaml ]]; do echo "Waiting for Frigate to be ready..." sleep 15 @@ -122,6 +125,6 @@ EOF mkdir -p /home/numbus-admin/.numbus-server/ touch /home/numbus-admin/.numbus-server/quirked.true - ''; + ''; }; } \ No newline at end of file