From 49bb74859f5c09074e1d2f0f8af17783b4cc4ade Mon Sep 17 00:00:00 2001 From: Jan Date: Wed, 12 Feb 2025 16:41:51 +0100 Subject: [PATCH] Adjusted Stuff --- .gitignore | 2 ++ {scriipts => scripts}/post_hardware.sh | 0 {scriipts => scripts}/setup.sh | 0 setup.sh | 21 +++++++++++++++++++++ shell.nix | 9 +++++++++ 5 files changed, 32 insertions(+) create mode 100644 .gitignore rename {scriipts => scripts}/post_hardware.sh (100%) rename {scriipts => scripts}/setup.sh (100%) create mode 100644 setup.sh create mode 100644 shell.nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2cf64f2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +images/* +source/* diff --git a/scriipts/post_hardware.sh b/scripts/post_hardware.sh similarity index 100% rename from scriipts/post_hardware.sh rename to scripts/post_hardware.sh diff --git a/scriipts/setup.sh b/scripts/setup.sh similarity index 100% rename from scriipts/setup.sh rename to scripts/setup.sh diff --git a/setup.sh b/setup.sh new file mode 100644 index 0000000..1ecbacc --- /dev/null +++ b/setup.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# Change to the script's directory +cd "$(dirname "$0")" + +ISO_URL="https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.9.0-amd64-netinst.iso" +IMAGE_DIR="images" +ISO_NAME="$IMAGE_DIR/debian-server.iso" +SOURCE_DIR="source" + +# Create necessary directories +mkdir -p "$IMAGE_DIR" "$SOURCE_DIR" + +# Download the ISO file +wget -O "$ISO_NAME" "$ISO_URL" + +# Extract ISO contents +xorriso -osirrox on -indev "$ISO_NAME" -extract / "$SOURCE_DIR/" + +echo "Debian server ISO file downloaded to $IMAGE_DIR and extracted to $SOURCE_DIR" + diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..51ee186 --- /dev/null +++ b/shell.nix @@ -0,0 +1,9 @@ +{ pkgs ? import {} }: + +pkgs.mkShell { + buildInputs = [ + pkgs.xorriso + pkgs.p7zip + ]; +} +