Fixed aesthetics
This commit is contained in:
@@ -167,14 +167,14 @@ files_generation() {
|
||||
mkdir -p extra-files/mnt/data-storage/nextcloud/
|
||||
mkdir -p extra-files/mnt/data-storage/immich/
|
||||
|
||||
echo -e "\n\n ✅ Generating sops-nix keys..."
|
||||
echo -e "\n ✅ Generating sops-nix keys..."
|
||||
ssh-to-age -private-key -i extra-files/home/numbus-admin/.ssh/id_ed25519 > extra-files/var/lib/sops-nix/key.txt
|
||||
SOPS_PUBLIC_KEY=$(age-keygen -y extra-files/var/lib/sops-nix/key.txt)
|
||||
|
||||
echo -e "\n\n ✅ Generating sops-nix configuration files..."
|
||||
echo -e "\n ✅ Generating sops-nix configuration files..."
|
||||
envsubst < config-files/sops-nix/.sops.yaml > extra-files/etc/nixos/.sops.yaml
|
||||
|
||||
echo -e "\n\n ✅ Generating secure random database passwords..."
|
||||
echo -e "\n ✅ Generating secure random database passwords..."
|
||||
HOME_ASSISTANT_MQTT_USER=$(openssl rand -base64 29 | tr -d "\123456789=+/" | cut -c1-10)
|
||||
HOME_ASSISTANT_MQTT_PASSWORD=$(openssl rand -base64 29 | tr -d "\=+/" | cut -c1-64)
|
||||
PASSBOLT_MYSQL_DATABASE=$(openssl rand -base64 29 | tr -d "\123456789=+/" | cut -c1-10)
|
||||
@@ -191,17 +191,17 @@ files_generation() {
|
||||
PARITY_DISK_2=$(openssl rand -base64 300 | tr -d "\=+/" | cut -c1-300)
|
||||
PARITY_DISK_3=$(openssl rand -base64 300 | tr -d "\=+/" | cut -c1-300)
|
||||
|
||||
echo -e "\n\n ✅ Encrypting secrets in the correct file..."
|
||||
echo -e "\n ✅ Encrypting secrets in the correct file..."
|
||||
envsubst < "config-files/sops-nix/secrets.yaml" | sops encrypt --filename-override secrets.yaml \
|
||||
--input-type yaml --output-type yaml \
|
||||
--age $SOPS_PUBLIC_KEY \
|
||||
--output extra-files/etc/nixos/secrets/secrets.yaml
|
||||
|
||||
echo -e "\n\n ✅ Writing correct ips to configuration.nix..."
|
||||
echo -e "\n ✅ Writing correct ips to configuration.nix..."
|
||||
sed -i s+HOME_SERVER_IP+$HOME_SERVER_IP+g configuration.nix
|
||||
sed -i s+HOME_ROUTER_IP+$HOME_ROUTER_IP+g configuration.nix
|
||||
|
||||
echo -e "\n\n ✅ Adapting the docker configuration to your hardware..."
|
||||
echo -e "\n ✅ Adapting the docker configuration to your hardware..."
|
||||
DEVICES_BLOCK=""
|
||||
if [[ "$TARGET_GRAPHICS_RENDERER" == "true" ]]; then
|
||||
DEVICES_BLOCK+=" - /dev/dri/renderD300:/dev/dri/renderD300\n"
|
||||
@@ -224,13 +224,13 @@ files_generation() {
|
||||
sed -i.bak "/# --- hass devices --- #/d" docker/hass.original
|
||||
fi
|
||||
|
||||
echo -e "\n\n ✅ Copying configuration files for the selected homelab services..."
|
||||
echo -e "\n ✅ Copying configuration files for the selected homelab services..."
|
||||
cp docker/traefik.original docker/traefik.nix
|
||||
for service in "${SERVICES[@]}"; do
|
||||
cp docker/${service}.original docker/${service}.nix
|
||||
done
|
||||
|
||||
echo -e "\n\n ✅ Writing docker configuration files..."
|
||||
echo -e "\n ✅ Writing docker configuration files..."
|
||||
envsubst < config-files/docker/traefik/headers.yaml > extra-files/mnt/config-storage/traefik/config/conf/headers.yaml
|
||||
envsubst < config-files/docker/traefik/nextcloud.yaml > extra-files/mnt/config-storage/traefik/config/conf/nextcloud.yaml
|
||||
envsubst < config-files/docker/traefik/tls.yaml > extra-files/mnt/config-storage/traefik/config/conf/tls.yaml
|
||||
@@ -416,7 +416,7 @@ EOF
|
||||
echo -e "\n\n ⚙️ Generating disko configuration from templates..."
|
||||
template_file="config-files/disks/boot-${NUMBER_OF_BOOT_DISKS}.nix"
|
||||
(envsubst < "$template_file") > disk-config.nix
|
||||
echo " ✅ Generated boot disk configuration."
|
||||
echo -e "\n ✅ Generated boot disk configuration."
|
||||
|
||||
for i in $(seq 1 $NUMBER_OF_DATA_DISKS); do
|
||||
disk_var="DATA_DISK_$i"
|
||||
@@ -424,7 +424,7 @@ EOF
|
||||
export DISK_PATH=${!disk_var}
|
||||
(envsubst < "config-files/disks/data.nix") >> disk-config.nix
|
||||
done
|
||||
[[ "$NUMBER_OF_DATA_DISKS" -gt 0 ]] && echo " ✅ Generated $NUMBER_OF_DATA_DISKS data disk configuration(s)."
|
||||
[[ "$NUMBER_OF_DATA_DISKS" -gt 0 ]] && echo -e "\n ✅ Generated $NUMBER_OF_DATA_DISKS data disk configuration(s)."
|
||||
|
||||
for i in $(seq 1 $NUMBER_OF_PARITY_DISKS); do
|
||||
disk_var="PARITY_DISK_$i"
|
||||
@@ -432,7 +432,7 @@ EOF
|
||||
export DISK_PATH=${!disk_var}
|
||||
(envsubst < "config-files/disks/parity.nix") >> disk-config.nix
|
||||
done
|
||||
[[ "$NUMBER_OF_PARITY_DISKS" -gt 0 ]] && echo " ✅ Generated $NUMBER_OF_PARITY_DISKS parity disk configuration(s)."
|
||||
[[ "$NUMBER_OF_PARITY_DISKS" -gt 0 ]] && echo -e "\n ✅ Generated $NUMBER_OF_PARITY_DISKS parity disk configuration(s)."
|
||||
|
||||
# Close the imports block
|
||||
cat <<'EOF' >> disk-config.nix
|
||||
@@ -440,7 +440,7 @@ EOF
|
||||
};
|
||||
}
|
||||
EOF
|
||||
echo -e " ✅ Final disko configuration created at 'disk-config.nix'."
|
||||
echo -e "\n ✅ Final disko configuration created at 'disk-config.nix'."
|
||||
}
|
||||
|
||||
deploy() {
|
||||
|
||||
Reference in New Issue
Block a user