From 74df96fc30c9d71a65d90cf93ddba3b84a2f50a9 Mon Sep 17 00:00:00 2001 From: Sohrab Behdani Date: Tue, 23 Jul 2024 11:43:21 +0330 Subject: [PATCH] added plasma edition --- .github/workflows/build.yml | 70 ------------------------------ setup/plasma | 86 +++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 70 deletions(-) delete mode 100644 .github/workflows/build.yml create mode 100755 setup/plasma diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index d602d04..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,70 +0,0 @@ -# Adapted from https://github.com/andrewboring/alarm-images/blob/master/.github/workflows/build.yml - -name: Build Images - -on: - release: - types: - - created - -env: - api_key: ${{ secrets.GITHUB_TOKEN }} - name: ${{ github.event.repository.name }} - release_name: ${{ github.ref_name }} - GH_TOKEN: ${{ github.token }} - -jobs: - build: - permissions: - contents: write - runs-on: ubuntu-latest - strategy: - matrix: - arch: ['aarch64', 'rpi-aarch64'] - flavor: ['barebone'] - include: - - arch: rpi-aarch64 - flavor: xfce - - arch: rpi-aarch64 - flavor: trinity - - - - steps: - - uses: actions/checkout@v3 - - name: Configure Git user - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y parted wget dosfstools zip arch-install-scripts aria2 gh git - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - with: - platforms: arm,arm64 - - name: Build image - shell: bash - run: | - scripts=() - for script_name in "${{ matrix.arch }}" "${{ matrix.flavor }}" "${{ matrix.arch }}-${{ matrix.flavor }}"; do - script_path="setup/$script_name" - if [ -f "$script_path" ]; then - scripts+=("$script_path") - fi - done - sudo ./create-image 8G ${{ matrix.arch }} "${scripts[@]}" - - name: Rename image - id: rename-image - run: | - image_in_name="archlinux-${{ matrix.arch }}.img" - image_out_name="Parchlinux-${{ matrix.arch }}-${{ matrix.flavor }}-$(date '+%Y-%m-%d').img" - mv "$image_in_name" "$image_out_name" - echo "image_name=$image_out_name" >> "$GITHUB_OUTPUT" - - name: Compress image - run: | - mkdir image_parts - zip -r "image_parts/${{ steps.rename-image.outputs.image_name }}.zip" "${{ steps.rename-image.outputs.image_name }}" - - name: Upload image - run: | - sha256sum image_parts/* > image_parts/sha256sums.${{ matrix.arch }}.${{ matrix.flavor }}.txt - gh release upload ${{ github.event.release.tag_name }} ./image_parts/* -R ${{ github.repository }} diff --git a/setup/plasma b/setup/plasma new file mode 100755 index 0000000..1a4d0e2 --- /dev/null +++ b/setup/plasma @@ -0,0 +1,86 @@ +#!/bin/bash + +set -uo pipefail + +# Configure system locale to en_US.UTF-8 +sed -i 's/#\(en_US.UTF-8 UTF-8\)/\1/g' /etc/locale.gen +locale-gen +echo 'LANG=en_US.UTF-8' > /etc/locale.conf + +# Add archsink repo +cat <> /etc/pacman.conf + +[archsink] +Server = https://github.com/archsink/\$arch/releases/latest/download +SigLevel = Never + +[ppr] +Server = https://raw.githubusercontent.com/parchlinux-arm/ppr/main/aarch64/ +SigLevel = Never + +EOF + +# Enable parallel downloads +sed -i 's/#\(ParallelDownloads \)/\1/g' /etc/pacman.conf + +# Enable Sudo +sudo sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers + + +# Install Desktop and Apps +packages=( + plasma + dolphin + konsole + kate + gwenview + okular + parch-zram + sddm + parch-branding + noto-fonts + vazirmatn-fonts + parch-emoji-ios + arch-install-scripts + avahi + curl + git + htop + btop + man-db + neovim + pacman-contrib + yay-bin + python + rsync + sudo + tree + fastfetch + neofetch-git + firefox + networkmanager + network-manager-applet + zsh + vim + pipewire + pipewire-pulse + bluez + bluez-utils + blueman + pipewire-alsa + wireplumber +) +pacman -Syu --noconfirm --needed "${packages[@]}" + +# Enable services +systemctl enable avahi-daemon NetworkManager +systemctl enable sddm +systemctl enable bluetooth +systemctl enable parch-zram + + +# Prepare system for containers (e.g. for use with K3s) +# https://github.com/k3s-io/k3s/issues/2067#issuecomment-664048424 +#if ! grep -q cgroup /boot/cmdline.txt; then +# sed -i '$ s/$/ cgroup_memory=1 cgroup_enable=memory/g' /boot/cmdline.txt +#fi