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() {
|
postrun_action() {
|
||||||
TARGET_USER="numbus-admin"
|
TARGET_USER="numbus-admin"
|
||||||
|
TARGET_HOST="${HOME_SERVER_IP}"
|
||||||
REMOTE_PASS="changeMe!"
|
REMOTE_PASS="changeMe!"
|
||||||
|
|
||||||
echo -e "\n\n Now the remote machine will reboot. You will need to input the boot disk(s) passphrase.
|
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")
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
./disks/disko.nix
|
./disks/disko.nix
|
||||||
|
./misc/activation.nix
|
||||||
./misc/mail.nix
|
./misc/mail.nix
|
||||||
./misc/networking.nix
|
./misc/networking.nix
|
||||||
./misc/smart.nix
|
./misc/smart.nix
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ PODMAN_NETWORKS
|
|||||||
};
|
};
|
||||||
script = ''
|
script = ''
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
if [[ -e /home/numbus-admin/.numbus-server/quirked.true ]]; then
|
if [[ -e /home/numbus-admin/.numbus-server/quirked.true ]]; then
|
||||||
exit 0
|
exit 0
|
||||||
@@ -86,12 +87,13 @@ PODMAN_NETWORKS
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -e /etc/nixos/podman/home-assistant.nix ]]; then
|
if [[ ! -e /etc/nixos/podman/home-assistant.nix ]]; then
|
||||||
|
mkdir -p /mnt/config/home-assistant/
|
||||||
until [[ -e /mnt/config/home-assistant/configuration.yaml ]]; do
|
until [[ -e /mnt/config/home-assistant/configuration.yaml ]]; do
|
||||||
echo "Waiting for Home Assistant to be ready..."
|
echo "Waiting for Home Assistant to be ready..."
|
||||||
sleep 15
|
sleep 15
|
||||||
done
|
done
|
||||||
sleep 180
|
sleep 180
|
||||||
systemctl stop frigate.service
|
systemctl stop home-assistant.service
|
||||||
cat << 'EOF' >> /mnt/config/home-assistant/configuration.yaml
|
cat << 'EOF' >> /mnt/config/home-assistant/configuration.yaml
|
||||||
|
|
||||||
http:
|
http:
|
||||||
@@ -105,6 +107,7 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -e /etc/nixos/podman/frigate.nix ]]; then
|
if [[ ! -e /etc/nixos/podman/frigate.nix ]]; then
|
||||||
|
mkdir -p /mnt/config/frigate/
|
||||||
until [[ -e /mnt/config/frigate/config.yaml ]]; do
|
until [[ -e /mnt/config/frigate/config.yaml ]]; do
|
||||||
echo "Waiting for Frigate to be ready..."
|
echo "Waiting for Frigate to be ready..."
|
||||||
sleep 15
|
sleep 15
|
||||||
@@ -122,6 +125,6 @@ EOF
|
|||||||
|
|
||||||
mkdir -p /home/numbus-admin/.numbus-server/
|
mkdir -p /home/numbus-admin/.numbus-server/
|
||||||
touch /home/numbus-admin/.numbus-server/quirked.true
|
touch /home/numbus-admin/.numbus-server/quirked.true
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user