diff options
| -rwxr-xr-x | archsetup | 32 | ||||
| -rw-r--r-- | archsetup.conf.example | 5 | ||||
| -rwxr-xr-x | assets/color-themes/generate-palette.sh | 1 | ||||
| -rwxr-xr-x | assets/easyeffects-eq-presets.sh | 1 | ||||
| -rwxr-xr-x | init | 1 | ||||
| -rwxr-xr-x | scripts/arch-distrobox | 1 | ||||
| -rwxr-xr-x | scripts/audit-packages.sh | 1 | ||||
| -rwxr-xr-x | scripts/cmail-setup-finish.sh | 1 | ||||
| -rwxr-xr-x | scripts/games.sh | 1 | ||||
| -rwxr-xr-x | scripts/normalize-notify-sounds.sh | 1 | ||||
| -rwxr-xr-x | scripts/package-inventory | 1 | ||||
| -rwxr-xr-x | scripts/post-install.sh | 1 | ||||
| -rwxr-xr-x | scripts/setup-chess.sh | 1 | ||||
| -rwxr-xr-x | scripts/testing/cleanup-tests.sh | 1 | ||||
| -rwxr-xr-x | scripts/testing/create-base-vm.sh | 1 | ||||
| -rwxr-xr-x | scripts/testing/debug-vm.sh | 1 | ||||
| -rwxr-xr-x | scripts/testing/lib/logging.sh | 1 | ||||
| -rw-r--r-- | scripts/testing/lib/network-diagnostics.sh | 1 | ||||
| -rw-r--r-- | scripts/testing/lib/validation.sh | 1 | ||||
| -rwxr-xr-x | scripts/testing/lib/vm-utils.sh | 1 | ||||
| -rwxr-xr-x | scripts/testing/run-test-baremetal.sh | 1 | ||||
| -rwxr-xr-x | scripts/testing/run-test.sh | 1 | ||||
| -rwxr-xr-x | scripts/testing/setup-testing-env.sh | 1 | ||||
| -rw-r--r-- | scripts/wipedisk | 1 | ||||
| -rwxr-xr-x | scripts/zfs-replicate | 1 |
25 files changed, 50 insertions, 10 deletions
@@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: GPL-3.0-or-later # ArchSetup - Craig Jennings <craigmartinjennings@gmail.com> # https://cjennings.net/archsetup # License: GNU GPLv3 @@ -35,6 +36,7 @@ show_status_only=false skip_gpu_drivers=false enable_autologin="" # empty=auto-detect, true=force enable, false=skip install_claude_code=true # false to skip the claude-code native (curl|sh) install +install_device_udev_rules=true # false to skip device-specific udev rules (the Logitech BRIO camera rule) while [ $# -gt 0 ]; do case "$1" in @@ -123,6 +125,8 @@ load_config() { [[ "$NO_GPU_DRIVERS" == "yes" ]] && skip_gpu_drivers=true [[ "$INSTALL_CLAUDE_CODE" == "yes" ]] && install_claude_code=true [[ "$INSTALL_CLAUDE_CODE" == "no" ]] && install_claude_code=false + [[ "$INSTALL_DEVICE_UDEV_RULES" == "yes" ]] && install_device_udev_rules=true + [[ "$INSTALL_DEVICE_UDEV_RULES" == "no" ]] && install_device_udev_rules=false # Repository overrides [[ -n "$DWM_REPO" ]] && dwm_repo="$DWM_REPO" @@ -188,6 +192,10 @@ validate_config() { echo "ERROR: INSTALL_CLAUDE_CODE must be 'yes' or 'no'. Got: '$INSTALL_CLAUDE_CODE'" >&2 exit 1 fi + if [[ -n "$INSTALL_DEVICE_UDEV_RULES" && "$INSTALL_DEVICE_UDEV_RULES" != "yes" && "$INSTALL_DEVICE_UDEV_RULES" != "no" ]]; then + echo "ERROR: INSTALL_DEVICE_UDEV_RULES must be 'yes' or 'no'. Got: '$INSTALL_DEVICE_UDEV_RULES'" >&2 + exit 1 + fi if [[ -n "$locale" && ! "$locale" =~ ^[a-z]{2,3}(_[A-Z]{2})?(\.[A-Za-z0-9-]+)?(@[A-Za-z]+)?$ ]]; then echo "ERROR: LOCALE looks malformed: '$locale'. Expected e.g. en_US.UTF-8" >&2 @@ -374,12 +382,12 @@ safe_rm_rf() { } # Handle --status flag (must be after state_dir is defined) -if $show_status_only; then +if [ "$show_status_only" = "true" ]; then show_status fi # Handle --fresh flag -if $fresh_install; then +if [ "$fresh_install" = "true" ]; then echo "Starting fresh installation (removing previous state)..." safe_rm_rf "$state_dir" "/var/lib/archsetup" fi @@ -743,7 +751,7 @@ EOF # GPU Driver Installation install_gpu_drivers() { - if $skip_gpu_drivers; then + if [ "$skip_gpu_drivers" = "true" ]; then display "task" "Skipping GPU driver installation (--no-gpu-drivers)" return 0 fi @@ -770,7 +778,7 @@ install_gpu_drivers() { done # Fallback: check PCI bus modalias if DRM not available (early boot/chroot) - if ! $detected_intel && ! $detected_amd && ! $detected_nvidia; then + if [ "$detected_intel" != "true" ] && [ "$detected_amd" != "true" ] && [ "$detected_nvidia" != "true" ]; then for modalias_file in /sys/bus/pci/devices/*/modalias; do if [[ -r "$modalias_file" ]]; then modalias=$(cat "$modalias_file" 2>/dev/null) @@ -787,21 +795,21 @@ install_gpu_drivers() { fi # Install drivers based on detected hardware - if $detected_intel; then + if [ "$detected_intel" = "true" ]; then display "task" "Intel GPU detected (via modalias) - installing drivers" pacman_install mesa pacman_install intel-media-driver # hardware video acceleration pacman_install vulkan-intel # Vulkan support fi - if $detected_amd; then + if [ "$detected_amd" = "true" ]; then display "task" "AMD GPU detected (via modalias) - installing drivers" pacman_install mesa # includes VAAPI drivers (libva-mesa-driver was folded in) pacman_install xf86-video-amdgpu pacman_install vulkan-radeon fi - if $detected_nvidia; then + if [ "$detected_nvidia" = "true" ]; then display "task" "NVIDIA GPU detected (via modalias) - installing drivers" # nvidia-dkms left the repos; nvidia-open-dkms is the packaged driver # (Turing and newer — pre-Turing cards need an AUR legacy variant, @@ -813,7 +821,7 @@ install_gpu_drivers() { fi # Fallback for VMs or unknown hardware - if ! $detected_intel && ! $detected_amd && ! $detected_nvidia; then + if [ "$detected_intel" != "true" ] && [ "$detected_amd" != "true" ] && [ "$detected_nvidia" != "true" ]; then display "task" "No GPU detected via modalias - installing generic drivers" pacman_install mesa pacman_install xf86-video-vesa @@ -1722,7 +1730,10 @@ hyprland() { pacman_install wev # wayland event debugger (xev equivalent) - # Logitech BRIO webcam auto-configuration + # Device-specific udev rules (opt-out via INSTALL_DEVICE_UDEV_RULES=no). + # Currently the Logitech BRIO webcam auto-configuration; tied to hardware not + # everyone has, so it's gated for the open-source release. + if [ "$install_device_udev_rules" = "true" ]; then action="creating Logitech BRIO udev rule" && display "task" "$action" cat > /etc/udev/rules.d/99-logitech-brio.rules << 'UDEVEOF' # Apply camera settings when Logitech BRIO is connected @@ -1730,6 +1741,7 @@ ACTION=="add", SUBSYSTEM=="video4linux", ATTRS{idVendor}=="046d", ATTRS{idProduc UDEVEOF sed -i "s/ARCHSETUP_USERNAME/${username}/" /etc/udev/rules.d/99-logitech-brio.rules chmod 644 /etc/udev/rules.d/99-logitech-brio.rules + fi } ### Display Server (conditional) @@ -2154,7 +2166,7 @@ developer_workstation() { # AI coding assistant (native install to ~/.local/bin), opt-out via # INSTALL_CLAUDE_CODE=no / --no-claude-code. Gated because it's curl|sh from # a third party and not every user wants AI tooling. - if [ "$install_claude_code" = true ]; then + if [ "$install_claude_code" = "true" ]; then action="installing claude-code via native installer" && display "task" "$action" (sudo -u "$username" bash -c 'curl -fsSL https://claude.ai/install.sh | sh' >> "$logfile" 2>&1) || \ error_warn "$action" "$?" diff --git a/archsetup.conf.example b/archsetup.conf.example index 962d05f..82f6898 100644 --- a/archsetup.conf.example +++ b/archsetup.conf.example @@ -39,6 +39,11 @@ # Set to "no" to skip it (no AI tooling, avoids the curl-pipe-bash step). #INSTALL_CLAUDE_CODE=yes +# Install device-specific udev rules (default: yes) +# Currently the Logitech BRIO webcam auto-configuration rule. These target +# specific hardware; set to "no" if your machine doesn't have those devices. +#INSTALL_DEVICE_UDEV_RULES=yes + # System locale (default: prompt if not already configured) # Common options: en_US.UTF-8, en_GB.UTF-8, de_DE.UTF-8, es_ES.UTF-8, # fr_FR.UTF-8, pt_BR.UTF-8, ja_JP.UTF-8, zh_CN.UTF-8 diff --git a/assets/color-themes/generate-palette.sh b/assets/color-themes/generate-palette.sh index 456d1a4..5a11264 100755 --- a/assets/color-themes/generate-palette.sh +++ b/assets/color-themes/generate-palette.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-3.0-or-later # Generate dupre-palette.png from color definitions using ImageMagick. # Output: assets/color-themes/dupre/dupre-palette.png diff --git a/assets/easyeffects-eq-presets.sh b/assets/easyeffects-eq-presets.sh index 40e9cd9..9a2ecef 100755 --- a/assets/easyeffects-eq-presets.sh +++ b/assets/easyeffects-eq-presets.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: GPL-3.0-or-later # Install EasyEffects parametric EQ presets (Harman target) # # Presets: @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-3.0-or-later # update and install tmux and git pacman -Sy --noconfirm >> /dev/null diff --git a/scripts/arch-distrobox b/scripts/arch-distrobox index 4afe3d1..99c295d 100755 --- a/scripts/arch-distrobox +++ b/scripts/arch-distrobox @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-3.0-or-later # ArchDistrobox - Craig Jennings <craigmartinjennings@gmail.com> # License: GNU GPLv3 diff --git a/scripts/audit-packages.sh b/scripts/audit-packages.sh index f7af19f..e41b79c 100755 --- a/scripts/audit-packages.sh +++ b/scripts/audit-packages.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: GPL-3.0-or-later # audit-packages.sh — verify every package archsetup installs still exists # at its declared source, and flag packages that moved between the official # repos and the AUR. diff --git a/scripts/cmail-setup-finish.sh b/scripts/cmail-setup-finish.sh index 704b707..7f9d3fc 100755 --- a/scripts/cmail-setup-finish.sh +++ b/scripts/cmail-setup-finish.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: GPL-3.0-or-later # cmail-setup-finish.sh — finish Proton Mail Bridge + cmail-action setup after # Bridge first-run. Idempotent; safe to re-run after a Bridge cert rotation or # a claude-templates re-clone. diff --git a/scripts/games.sh b/scripts/games.sh index de6a476..2ccdcb4 100755 --- a/scripts/games.sh +++ b/scripts/games.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: GPL-3.0-or-later # games installations via flatpak set -uo pipefail diff --git a/scripts/normalize-notify-sounds.sh b/scripts/normalize-notify-sounds.sh index 52c1d36..72c4c33 100755 --- a/scripts/normalize-notify-sounds.sh +++ b/scripts/normalize-notify-sounds.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: GPL-3.0-or-later # Normalize notify sound files to a uniform RMS loudness so every notification # plays at the same perceived level. Re-encodes each file in place (ogg -> ogg). # Run once after adding or changing a sound in the notify set. diff --git a/scripts/package-inventory b/scripts/package-inventory index 2dda44b..0a4acf7 100755 --- a/scripts/package-inventory +++ b/scripts/package-inventory @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: GPL-3.0-or-later # package-inventory - Compare archsetup packages vs live system # Shows: packages in archsetup but missing from system, # packages on system but not in archsetup diff --git a/scripts/post-install.sh b/scripts/post-install.sh index 9045398..f7dd206 100755 --- a/scripts/post-install.sh +++ b/scripts/post-install.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-3.0-or-later logfile="$HOME/post-install.log" touch "$logfile" diff --git a/scripts/setup-chess.sh b/scripts/setup-chess.sh index 6ac8749..648eea9 100755 --- a/scripts/setup-chess.sh +++ b/scripts/setup-chess.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: GPL-3.0-or-later set -euo pipefail # En Croissant + lc0 + Maia + Stockfish setup script for Arch Linux. diff --git a/scripts/testing/cleanup-tests.sh b/scripts/testing/cleanup-tests.sh index 5c0153b..390d7e5 100755 --- a/scripts/testing/cleanup-tests.sh +++ b/scripts/testing/cleanup-tests.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: GPL-3.0-or-later # Clean up old test VMs and artifacts # Author: Craig Jennings <craigmartinjennings@gmail.com> # License: GNU GPLv3 diff --git a/scripts/testing/create-base-vm.sh b/scripts/testing/create-base-vm.sh index 4ecf4d6..b8a4e2b 100755 --- a/scripts/testing/create-base-vm.sh +++ b/scripts/testing/create-base-vm.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: GPL-3.0-or-later # Create base VM for archsetup testing - Automated via Archangel ISO # Author: Craig Jennings <craigmartinjennings@gmail.com> # License: GNU GPLv3 diff --git a/scripts/testing/debug-vm.sh b/scripts/testing/debug-vm.sh index 32f377c..b0fa2b9 100755 --- a/scripts/testing/debug-vm.sh +++ b/scripts/testing/debug-vm.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: GPL-3.0-or-later # Launch VM for interactive debugging # Author: Craig Jennings <craigmartinjennings@gmail.com> # License: GNU GPLv3 diff --git a/scripts/testing/lib/logging.sh b/scripts/testing/lib/logging.sh index ed20707..809d396 100755 --- a/scripts/testing/lib/logging.sh +++ b/scripts/testing/lib/logging.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: GPL-3.0-or-later # Logging utilities for archsetup testing # Author: Craig Jennings <craigmartinjennings@gmail.com> # License: GNU GPLv3 diff --git a/scripts/testing/lib/network-diagnostics.sh b/scripts/testing/lib/network-diagnostics.sh index 674aeba..38788e5 100644 --- a/scripts/testing/lib/network-diagnostics.sh +++ b/scripts/testing/lib/network-diagnostics.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: GPL-3.0-or-later # Network diagnostics for VM testing # Author: Craig Jennings <craigmartinjennings@gmail.com> # License: GNU GPLv3 diff --git a/scripts/testing/lib/validation.sh b/scripts/testing/lib/validation.sh index 91270ef..6855da7 100644 --- a/scripts/testing/lib/validation.sh +++ b/scripts/testing/lib/validation.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: GPL-3.0-or-later # Validation utilities for archsetup testing # Author: Craig Jennings <craigmartinjennings@gmail.com> # License: GNU GPLv3 diff --git a/scripts/testing/lib/vm-utils.sh b/scripts/testing/lib/vm-utils.sh index a8736a3..d029d58 100755 --- a/scripts/testing/lib/vm-utils.sh +++ b/scripts/testing/lib/vm-utils.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: GPL-3.0-or-later # VM management utilities for archsetup testing (direct QEMU) # Author: Craig Jennings <craigmartinjennings@gmail.com> # License: GNU GPLv3 diff --git a/scripts/testing/run-test-baremetal.sh b/scripts/testing/run-test-baremetal.sh index b6d1ab1..ae88316 100755 --- a/scripts/testing/run-test-baremetal.sh +++ b/scripts/testing/run-test-baremetal.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: GPL-3.0-or-later # Run archsetup test on bare metal ZFS system # Author: Craig Jennings <craigmartinjennings@gmail.com> # License: GNU GPLv3 diff --git a/scripts/testing/run-test.sh b/scripts/testing/run-test.sh index 5830ed9..9b47747 100755 --- a/scripts/testing/run-test.sh +++ b/scripts/testing/run-test.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: GPL-3.0-or-later # Run archsetup test in a VM using snapshots # Author: Craig Jennings <craigmartinjennings@gmail.com> # License: GNU GPLv3 diff --git a/scripts/testing/setup-testing-env.sh b/scripts/testing/setup-testing-env.sh index fb0628b..b5b584f 100755 --- a/scripts/testing/setup-testing-env.sh +++ b/scripts/testing/setup-testing-env.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: GPL-3.0-or-later # Setup testing environment for archsetup # Author: Craig Jennings <craigmartinjennings@gmail.com> # License: GNU GPLv3 diff --git a/scripts/wipedisk b/scripts/wipedisk index 0c08c72..b833407 100644 --- a/scripts/wipedisk +++ b/scripts/wipedisk @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: GPL-3.0-or-later # Craig Jennings <c@cjennings.net> # identify disk and erase diff --git a/scripts/zfs-replicate b/scripts/zfs-replicate index cf946f1..02ffcf5 100755 --- a/scripts/zfs-replicate +++ b/scripts/zfs-replicate @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: GPL-3.0-or-later # zfs-replicate - Replicate ZFS datasets to TrueNAS # # Usage: |
