diff --git a/.github/workflows/build-iso.yml b/.github/workflows/build-iso.yml index 2969809..0eb9a1e 100644 --- a/.github/workflows/build-iso.yml +++ b/.github/workflows/build-iso.yml @@ -108,41 +108,6 @@ jobs: # Copy target package list for installer cp archiso/target-packages.x86_64 archiso/airootfs/root/ - # Create auto-login service - mkdir -p archiso/airootfs/etc/systemd/system/getty@tty1.service.d - cat > archiso/airootfs/etc/systemd/system/getty@tty1.service.d/autologin.conf << EOF - [Service] - ExecStart= - ExecStart=-/sbin/agetty --autologin root --noclear %I \$TERM - EOF - - # Create installer launch script - cat > archiso/airootfs/root/.bash_profile << 'EOF' - #!/bin/bash - - # Auto-start installer on login - if [[ -z \$DISPLAY ]] && [[ \$(tty) = /dev/tty1 ]]; then - clear - echo "Welcome to Hyprland Minimal Installer" - echo "" - echo "Type 'installer' to start the installation process" - echo "Type 'help' for more options" - echo "" - fi - - alias installer='/usr/local/bin/installer.sh' - alias help='echo "Available commands: - installer - Start the installation process - iwctl - Configure WiFi manually - nmtui - Network configuration UI - fdisk -l - List available disks - lsblk - Show block devices - reboot - Restart the system - poweroff - Shutdown the system"' - - source ~/.bashrc - EOF - # Set correct permissions chmod +x archiso/airootfs/usr/local/bin/installer.sh chmod +x archiso/profiledef.sh diff --git a/archiso/airootfs/etc/hostname b/archiso/airootfs/etc/hostname new file mode 100644 index 0000000..2dbe21e --- /dev/null +++ b/archiso/airootfs/etc/hostname @@ -0,0 +1 @@ +archiso diff --git a/archiso/airootfs/etc/locale.conf b/archiso/airootfs/etc/locale.conf new file mode 100644 index 0000000..01ec548 --- /dev/null +++ b/archiso/airootfs/etc/locale.conf @@ -0,0 +1 @@ +LANG=en_US.UTF-8 diff --git a/archiso/airootfs/etc/systemd/system/getty@tty1.service.d/autologin.conf b/archiso/airootfs/etc/systemd/system/getty@tty1.service.d/autologin.conf new file mode 100644 index 0000000..b9d22eb --- /dev/null +++ b/archiso/airootfs/etc/systemd/system/getty@tty1.service.d/autologin.conf @@ -0,0 +1,3 @@ +[Service] +ExecStart= +ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin root - $TERM diff --git a/archiso/airootfs/etc/systemd/system/multi-user.target.wants/NetworkManager.service b/archiso/airootfs/etc/systemd/system/multi-user.target.wants/NetworkManager.service new file mode 120000 index 0000000..e874a9b --- /dev/null +++ b/archiso/airootfs/etc/systemd/system/multi-user.target.wants/NetworkManager.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/NetworkManager.service \ No newline at end of file diff --git a/archiso/airootfs/etc/systemd/system/multi-user.target.wants/iwd.service b/archiso/airootfs/etc/systemd/system/multi-user.target.wants/iwd.service new file mode 120000 index 0000000..3625abd --- /dev/null +++ b/archiso/airootfs/etc/systemd/system/multi-user.target.wants/iwd.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/iwd.service \ No newline at end of file diff --git a/archiso/airootfs/etc/systemd/system/multi-user.target.wants/pacman-init.service b/archiso/airootfs/etc/systemd/system/multi-user.target.wants/pacman-init.service new file mode 120000 index 0000000..d09eec6 --- /dev/null +++ b/archiso/airootfs/etc/systemd/system/multi-user.target.wants/pacman-init.service @@ -0,0 +1 @@ +../pacman-init.service \ No newline at end of file diff --git a/archiso/airootfs/etc/systemd/system/multi-user.target.wants/sshd.service b/archiso/airootfs/etc/systemd/system/multi-user.target.wants/sshd.service new file mode 120000 index 0000000..d21ebd9 --- /dev/null +++ b/archiso/airootfs/etc/systemd/system/multi-user.target.wants/sshd.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/sshd.service \ No newline at end of file diff --git a/archiso/airootfs/etc/systemd/system/pacman-init.service b/archiso/airootfs/etc/systemd/system/pacman-init.service new file mode 100644 index 0000000..725b5b4 --- /dev/null +++ b/archiso/airootfs/etc/systemd/system/pacman-init.service @@ -0,0 +1,13 @@ +[Unit] +Description=Initializes Pacman keyring +Before=sshd.service cloud-init-local.service +ConditionDirectoryNotEmpty=!/etc/pacman.d/gnupg + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/pacman-key --init +ExecStart=/usr/bin/pacman-key --populate + +[Install] +WantedBy=multi-user.target diff --git a/build-docker.sh b/build-docker.sh index 81639b1..0e98f4d 100755 --- a/build-docker.sh +++ b/build-docker.sh @@ -77,30 +77,6 @@ cp .chezmoi.toml.tmpl archiso/airootfs/root/dotfiles/ 2>/dev/null || true # Copy target package list for installer cp archiso/target-packages.x86_64 archiso/airootfs/root/ -# Create auto-login service -mkdir -p archiso/airootfs/etc/systemd/system/getty@tty1.service.d -cat > archiso/airootfs/etc/systemd/system/getty@tty1.service.d/autologin.conf << EOF -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear %I \$TERM -EOF - -# Create installer launch script -cat > archiso/airootfs/root/.bash_profile << "EOF" -#!/bin/bash - -if [[ -z \$DISPLAY ]] && [[ \$(tty) = /dev/tty1 ]]; then - clear - echo "Welcome to Hyprland Minimal Installer" - echo "" - echo "Type '\''installer'\'' to start the installation process" - echo "" -fi - -alias installer="/usr/local/bin/installer.sh" -source ~/.bashrc 2>/dev/null || true -EOF - # Set permissions chmod +x archiso/airootfs/usr/local/bin/installer.sh 2>/dev/null || true chmod +x archiso/profiledef.sh 2>/dev/null || true diff --git a/build-iso.sh b/build-iso.sh index f654d92..af5c673 100644 --- a/build-iso.sh +++ b/build-iso.sh @@ -51,42 +51,6 @@ cp "$SCRIPT_DIR/.chezmoi.toml.tmpl" "$PROFILE_DIR/airootfs/root/dotfiles/" # Copy target package list for installer cp "$PROFILE_DIR/target-packages.x86_64" "$PROFILE_DIR/airootfs/root/" -# Create auto-login service -print_step "Creating auto-login service" -mkdir -p "$PROFILE_DIR/airootfs/etc/systemd/system/getty@tty1.service.d" -cat > "$PROFILE_DIR/airootfs/etc/systemd/system/getty@tty1.service.d/autologin.conf" << EOF -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear %I \$TERM -EOF - -# Create installer launch script -cat > "$PROFILE_DIR/airootfs/root/.bash_profile" << 'EOF' -#!/bin/bash - -# Auto-start installer on login -if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then - clear - echo "Welcome to Hyprland Minimal Installer" - echo "" - echo "Type 'installer' to start the installation process" - echo "Type 'help' for more options" - echo "" -fi - -alias installer='/usr/local/bin/installer.sh' -alias help='echo "Available commands: - installer - Start the installation process - iwctl - Configure WiFi manually - nmtui - Network configuration UI - fdisk -l - List available disks - lsblk - Show block devices - reboot - Restart the system - poweroff - Shutdown the system"' - -source ~/.bashrc -EOF - # Build the ISO print_step "Building ISO (this will take some time)..." mkarchiso -v -w "$WORK_DIR" -o "$OUT_DIR" "$PROFILE_DIR"