TEST
This commit is contained in:
@@ -453,7 +453,7 @@ EOF
|
||||
gum confirm "Proceed with this disk configuration?" || { echo " ❌ Aborting as requested."; exit 1; }
|
||||
# Final recap <--
|
||||
|
||||
echo -e "\n\n ⚙️ Generating disko configuration from templates..."
|
||||
echo -e "\n\n ✅ Generating disko configuration from templates..."
|
||||
template_file="config-files/disks/boot-${NUMBER_OF_BOOT_DISKS}.nix"
|
||||
(envsubst < "$template_file") > ./nix-config/disks/disko.nix
|
||||
echo -e "\n ✅ Generated boot disk configuration."
|
||||
@@ -474,13 +474,17 @@ EOF
|
||||
done
|
||||
[[ "$NUMBER_OF_PARITY_DISKS" -gt 0 ]] && echo -e "\n ✅ Generated $NUMBER_OF_PARITY_DISKS parity disk configuration(s)."
|
||||
|
||||
# Close the disko imports block
|
||||
echo '}' >> ./nix-config/disks/disko.nix
|
||||
echo -e "\n ✅ Final disko configuration created at './nix-config/disks/disko.nix'."
|
||||
cat <<'EOF' >> ./nix-config/disks/disko.nix
|
||||
};
|
||||
};
|
||||
}
|
||||
EOF
|
||||
|
||||
echo -e "\n ✅ Final disko configuration created.
|
||||
|
||||
# --> Generate automatic unlock configuration in ./nix-config/disks/snapraid.nix
|
||||
if [[ "$NUMBER_OF_CONTENT_DISKS" -gt 0 || "$NUMBER_OF_PARITY_DISKS" -gt 0 ]]; then
|
||||
echo -e "\n ⚙️ Adding automatic disk unlocking configuration to './nix-config/disks/snapraid.nix'..."
|
||||
echo -e "\n\n ✅ Adding automatic disk unlocking configuration to './nix-config/disks/snapraid.nix'..."
|
||||
sed -i '$ d' ./nix-config/disks/snapraid.nix
|
||||
|
||||
cat <<EOF >> ./nix-config/disks/snapraid.nix
|
||||
@@ -512,8 +516,6 @@ EOF
|
||||
};
|
||||
}
|
||||
EOF
|
||||
|
||||
echo -e "\n\n ✅ Automatic disks unlock configuration added."
|
||||
fi
|
||||
# Generate automatic unlock configuration in ./nix-config/disks/snapraid.nix <--
|
||||
}
|
||||
@@ -522,7 +524,7 @@ deploy() {
|
||||
echo -e "\n\n 🔄 Deploying to the remote server..."
|
||||
nix run github:nix-community/nixos-anywhere -- \
|
||||
--generate-hardware-config nixos-generate-config ./nix-config/hardware-configuration.nix \
|
||||
--flake ./nix-config/flake.nix#numbus-server \
|
||||
--flake ./nix-config#numbus-server \
|
||||
--extra-files extra-files \
|
||||
--chown "/home/numbus-admin/" 1000:1000 \
|
||||
--target-host nixos@$TARGET_HOST
|
||||
|
||||
Reference in New Issue
Block a user