Fixed missing activation scripts. Made activation script more robust. Fixed SSH not working because wrong IP.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
'';
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user