mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Add modifications to support Offline ISO (#1621)
* Change lazyvim and asdcontrol to packages * Remove asdcontrol and lazyvim * Add lazyvim setup * Don't trigger rebuild. We already rebuild later. * Add new pacman.conf after install * Update config to keep mirrors in mirrorlist * Add lazyvim setup back * Make webapp installer work with local images * Update tuis to work offline * Update pacman config situation * Extract the reboot segment into its own file * Explainer * Can't return in executed scripts * Add post-install * Extract the reboot segment into its own file * Fix rebase doubling up * Add run wrapper function for feedback * Redirect output to log * Move gnome updates to first-run * Add theme to first-run * Updat to try to get logging working * Create the file and give permissions * Test gsettings * Revert "Test gsettings" This reverts commit 49c27d319407f6c95fcbb4c5a2646e54b50c9ab4. * Stop logging * Add time outputs to end of logs * Rearrange some scripts to cleanup * Cleanup * Add timing to run script * Don't enable multilib for offline * Add prebuild ruby * Try spinner setup * Prevent exit 1 due to grep not matching * Update limine config to work for USB installs as well * Add offline install to env report * Fix grep pipefailure * Update logs exports to work with subshells * Fix backward logic * Attempt to fix logging again * Export chrootable for subshells * Clean up outputs * Move chrootable up * Source chroot instead * Changes for logging * Center up reboot notice * Update fixed paths * Update trap * Revert reverting precompiled ruby due to issues * Revert "Revert reverting precompiled ruby due to issues" This reverts commit c159e7dc51cfdd2fb750c49c66bc4468e1208446. * Remove junk to cleanup fixed paths now that we have relative * Add git branch check to transition beta to main * Log output * Add time output on summary screen * We don't need sudo here * Add ansi helpers to make code cleaner * Add dry-run helpers for testing * Split out some common / reused items * Add log output function * Use gum log to output cleaner * Cleanup * Update trap with options * Fix reboot and pad it * Cleanup * Add dry-run for testing * Use default $PADDING for gum * More styles * Styles and really exit * Update to new format * Add ansi vars * Update log output to prevent flickering * Fix logo exporting * Trap updates * Add exit handler * Prevent double-trapping * Update traps * Consolidate logic * Update reboot to work in chroot * Eliminate double-guard * Attempt to speed up by removing mkinitcpio hooks * Add multilib for nvidia users * Add back wireless-regdom * Remove dryrun items * Fix to be offline * Set fonts for plymouth to solve freetype2 issue * Required -y to run * Update omarchy-refresh-plymouth to account for limine changes * Update omarchy-refresh-plymouth to account for limine changes (#1575) * Required -y to run * Update omarchy-refresh-plymouth to account for limine changes --------- Co-authored-by: David Heinemeier Hansson <david@hey.com> * Update modes * Remove direct executions of .sh files * Add variable safety * Add omarchy-upload-log * Add broadcome fix for MBP * Prevent printing on screen when rebooting * Make packages list universal * Rename * Remove retry message * Fix packages target * Add system info to upload * Update variable name * Remove unnecessary executable statuses * Remove gesture default * Add bcm4360 fix to install * Add useful debug info * Add OMARCHY_PATH * Only look locally offline * Rename / rearrange files * Export so they're available to subshells * Update for alternate * Rearrange * Log install time if no arch * Add limine to packages list * Update comments * Update sizing method * Update mode switcher * Move icons to be embedded in installer * Set install mode to online * shebang and sudo * Remove deleted branch check * Elim banners * Elim verbosity * Rename LOG_FILE * Multilib on by default * Flip to positive * Switch to gnome-theme.sh for first run * Elim ansi-codes helper * Move guard up to be the first thing that's hit * Extract a couple of functions * Trim * Trim * Move back to trap * Update to single gum file * Just show total * Pulled function to a helper * Extract explaining function * Use complete conditional flows where possible * Reference variable close to its use * Use modern bash conditional syntax * Comment before function * Use a simpler shared exit headline Doesn't matter how we stopped, just that we did * CRs * Keep constants together * Style on comment * Explain QR Code * Modern bash conditional and use lowercase for all local variables * Use bash calculation syntax for numbers * Use calculation syntax where possible * cleanup was not intention revealing enough imo * Spacing * Retry won't produce something different in offline mode * Not needed * Use modern bash conditional style * String-wrapping not needed in [[ ]] * Might as well use constants for all of these * Don't need the wrapping * Move the output saving into where we're working with it * Not needed as long as we just source this * Gum is a helper * Slim down logging setup * Reflect broader scope of work * Everything should live in file * Simpler * Ordering * Style * Better separation of concerns * Stop pretending these are meant to run directly * Move all packaging execution together * No longer used in an offline centric setup * None of these are directly executable any more either * Modern bash conditional * Better name * Explain what's going on * Use modern bash conditional * Use modern bash styule * No need for bashing --------- Co-authored-by: David Heinemeier Hansson <david@hey.com> Co-authored-by: DoppioJP <jakub@doppio.jp>
This commit is contained in:
2
install/config/branding.sh
Executable file → Normal file
2
install/config/branding.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Allow the user to change the branding for fastfetch and screensaver
|
||||
mkdir -p ~/.config/omarchy/branding
|
||||
cp ~/.local/share/omarchy/icon.txt ~/.config/omarchy/branding/about.txt
|
||||
|
||||
2
install/config/config.sh
Executable file → Normal file
2
install/config/config.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copy over Omarchy configs
|
||||
mkdir -p ~/.config
|
||||
cp -R ~/.local/share/omarchy/config/* ~/.config/
|
||||
|
||||
11
install/config/detect-keyboard-layout.sh
Executable file → Normal file
11
install/config/detect-keyboard-layout.sh
Executable file → Normal file
@@ -1,16 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copy over the keyboard layout that's been set in Arch during install to Hyprland
|
||||
conf="/etc/vconsole.conf"
|
||||
hyprconf="$HOME/.config/hypr/input.conf"
|
||||
|
||||
layout=$(grep '^XKBLAYOUT=' "$conf" | cut -d= -f2 | tr -d '"')
|
||||
variant=$(grep '^XKBVARIANT=' "$conf" | cut -d= -f2 | tr -d '"')
|
||||
|
||||
if [[ -n "$layout" ]]; then
|
||||
if grep -q '^XKBLAYOUT=' "$conf"; then
|
||||
layout=$(grep '^XKBLAYOUT=' "$conf" | cut -d= -f2 | tr -d '"')
|
||||
sed -i "/^[[:space:]]*kb_options *=/i\ kb_layout = $layout" "$hyprconf"
|
||||
fi
|
||||
|
||||
if [[ -n "$variant" ]]; then
|
||||
if grep -q '^XKBVARIANT=' "$conf"; then
|
||||
variant=$(grep '^XKBVARIANT=' "$conf" | cut -d= -f2 | tr -d '"')
|
||||
sed -i "/^[[:space:]]*kb_options *=/i\ kb_variant = $variant" "$hyprconf"
|
||||
fi
|
||||
|
||||
2
install/config/docker.sh
Executable file → Normal file
2
install/config/docker.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Configure Docker daemon:
|
||||
# - limit log size to avoid running out of disk
|
||||
# - use host's DNS resolver
|
||||
|
||||
2
install/config/git.sh
Executable file → Normal file
2
install/config/git.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Ensure git settings live under ~/.config
|
||||
mkdir -p ~/.config/git
|
||||
touch ~/.config/git/config
|
||||
|
||||
2
install/config/gpg.sh
Executable file → Normal file
2
install/config/gpg.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Setup GPG configuration with multiple keyservers for better reliability
|
||||
sudo mkdir -p /etc/gnupg
|
||||
sudo cp ~/.local/share/omarchy/default/gpg/dirmngr.conf /etc/gnupg/
|
||||
|
||||
2
install/config/hardware/bluetooth.sh
Executable file → Normal file
2
install/config/hardware/bluetooth.sh
Executable file → Normal file
@@ -1,4 +1,2 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Turn on bluetooth by default
|
||||
chrootable_systemctl_enable bluetooth.service
|
||||
|
||||
5
install/config/hardware/fix-apple-bcm4360.sh
Normal file
5
install/config/hardware/fix-apple-bcm4360.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
# Install wifi drivers for 2013-2015 MacBooks using the BCM4360 chip
|
||||
if lspci -nnv | grep -A2 "14e4:43a0" | grep -q "106b:"; then
|
||||
echo "Apple BCM4360 detected"
|
||||
sudo pacman -S --noconfirm --needed broadcom-wl dkms linux-headers
|
||||
fi
|
||||
4
install/config/hardware/fix-f13-amd-audio-input.sh
Executable file → Normal file
4
install/config/hardware/fix-f13-amd-audio-input.sh
Executable file → Normal file
@@ -1,6 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
AMD_AUDIO_CARD=$(pactl list cards | grep -B20 "Family 17h/19h" | grep "Name: " | awk '{print $2}')
|
||||
AMD_AUDIO_CARD=$(pactl list cards 2>/dev/null | grep -B20 "Family 17h/19h" | grep "Name: " | awk '{print $2}' || true)
|
||||
|
||||
if [[ -n $AMD_AUDIO_CARD ]]; then
|
||||
pactl set-card-profile "$AMD_AUDIO_CARD" "HiFi (Mic1, Mic2, Speaker)" 2>/dev/null || true
|
||||
|
||||
2
install/config/hardware/fix-fkeys.sh
Executable file → Normal file
2
install/config/hardware/fix-fkeys.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Ensure that F-keys on Apple-like keyboards (such as Lofree Flow84) are always F-keys
|
||||
if [[ ! -f /etc/modprobe.d/hid_apple.conf ]]; then
|
||||
echo "options hid_apple fnmode=2" | sudo tee /etc/modprobe.d/hid_apple.conf
|
||||
|
||||
3
install/config/hardware/ignore-power-button.sh
Executable file → Normal file
3
install/config/hardware/ignore-power-button.sh
Executable file → Normal file
@@ -1,5 +1,2 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Disable shutting system down on power button to bind it to power menu afterwards
|
||||
sudo sed -i 's/.*HandlePowerKey=.*/HandlePowerKey=ignore/' /etc/systemd/logind.conf
|
||||
|
||||
|
||||
3
install/config/hardware/intel.sh
Executable file → Normal file
3
install/config/hardware/intel.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This installs hardware video acceleration for Intel GPUs
|
||||
# Check if we have an Intel GPU at all
|
||||
if INTEL_GPU=$(lspci | grep -iE 'vga|3d|display' | grep -i 'intel'); then
|
||||
@@ -11,4 +9,3 @@ if INTEL_GPU=$(lspci | grep -iE 'vga|3d|display' | grep -i 'intel'); then
|
||||
sudo pacman -S --needed --noconfirm libva-intel-driver
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
2
install/config/hardware/network.sh
Executable file → Normal file
2
install/config/hardware/network.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Ensure iwd service will be started
|
||||
sudo systemctl enable iwd.service
|
||||
|
||||
|
||||
7
install/config/hardware/nvidia.sh
Executable file → Normal file
7
install/config/hardware/nvidia.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# ==============================================================================
|
||||
# Hyprland NVIDIA Setup Script for Arch Linux
|
||||
# ==============================================================================
|
||||
@@ -30,11 +28,6 @@ if [ -n "$(lspci | grep -i 'nvidia')" ]; then
|
||||
KERNEL_HEADERS="linux-hardened-headers"
|
||||
fi
|
||||
|
||||
# Enable multilib repository for 32-bit libraries
|
||||
if ! grep -q "^\[multilib\]" /etc/pacman.conf; then
|
||||
sudo sed -i '/^#\s*\[multilib\]/,/^#\s*Include/ s/^#\s*//' /etc/pacman.conf
|
||||
fi
|
||||
|
||||
# force package database refresh
|
||||
sudo pacman -Syu --noconfirm
|
||||
|
||||
|
||||
2
install/config/hardware/printer.sh
Executable file → Normal file
2
install/config/hardware/printer.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
chrootable_systemctl_enable cups.service
|
||||
|
||||
# Disable multicast dns in resolved. Avahi will provide this for better network printer discovery
|
||||
|
||||
15
install/config/hardware/set-wireless-regdom.sh
Executable file → Normal file
15
install/config/hardware/set-wireless-regdom.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# First check that wireless-regdb is there
|
||||
if [ -f "/etc/conf.d/wireless-regdom" ]; then
|
||||
unset WIRELESS_REGDOM
|
||||
@@ -12,25 +10,24 @@ if [ ! -n "${WIRELESS_REGDOM}" ]; then
|
||||
if [ -e "/etc/localtime" ]; then
|
||||
TIMEZONE=$(readlink -f /etc/localtime)
|
||||
TIMEZONE=${TIMEZONE#/usr/share/zoneinfo/}
|
||||
|
||||
|
||||
# Some timezones are formatted with the two letter country code at the start
|
||||
COUNTRY="${TIMEZONE%%/*}"
|
||||
|
||||
|
||||
# If we don't have a two letter country, get it from the timezone table
|
||||
if [[ ! "$COUNTRY" =~ ^[A-Z]{2}$ ]] && [ -f "/usr/share/zoneinfo/zone.tab" ]; then
|
||||
COUNTRY=$(awk -v tz="$TIMEZONE" '$3 == tz {print $1; exit}' /usr/share/zoneinfo/zone.tab)
|
||||
fi
|
||||
|
||||
|
||||
# Check if we have a two letter country code
|
||||
if [[ "$COUNTRY" =~ ^[A-Z]{2}$ ]]; then
|
||||
# Append it to the wireless-regdom conf file that is used at boot
|
||||
echo "WIRELESS_REGDOM=\"$COUNTRY\"" | sudo tee -a /etc/conf.d/wireless-regdom > /dev/null
|
||||
|
||||
echo "WIRELESS_REGDOM=\"$COUNTRY\"" | sudo tee -a /etc/conf.d/wireless-regdom >/dev/null
|
||||
|
||||
# Also set it one off now
|
||||
if command -v iw &> /dev/null; then
|
||||
if command -v iw &>/dev/null; then
|
||||
sudo iw reg set ${COUNTRY}
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
5
install/config/hardware/usb-autosuspend.sh
Executable file → Normal file
5
install/config/hardware/usb-autosuspend.sh
Executable file → Normal file
@@ -1,6 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Disable USB autosuspend to prevent peripheral disconnection issues
|
||||
if [[ ! -f /etc/modprobe.d/disable-usb-autosuspend.conf ]]; then
|
||||
echo "options usbcore autosuspend=-1" | sudo tee /etc/modprobe.d/disable-usb-autosuspend.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
2
install/config/increase-lockout-limit.sh
Executable file → Normal file
2
install/config/increase-lockout-limit.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Increase lockout limit to 10 and decrease timeout to 2 minutes
|
||||
sudo sed -i 's|^\(auth\s\+required\s\+pam_faillock.so\)\s\+preauth.*$|\1 preauth silent deny=10 unlock_time=120|' "/etc/pam.d/system-auth"
|
||||
sudo sed -i 's|^\(auth\s\+\[default=die\]\s\+pam_faillock.so\)\s\+authfail.*$|\1 authfail deny=10 unlock_time=120|' "/etc/pam.d/system-auth"
|
||||
|
||||
2
install/config/increase-sudo-tries.sh
Executable file → Normal file
2
install/config/increase-sudo-tries.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Give the user 10 instead of 3 tries to fat finger their password before lockout
|
||||
echo "Defaults passwd_tries=10" | sudo tee /etc/sudoers.d/passwd-tries
|
||||
sudo chmod 440 /etc/sudoers.d/passwd-tries
|
||||
|
||||
1
install/config/lazyvim.sh
Normal file
1
install/config/lazyvim.sh
Normal file
@@ -0,0 +1 @@
|
||||
omarchy-lazyvim-setup
|
||||
0
install/config/localdb.sh
Executable file → Normal file
0
install/config/localdb.sh
Executable file → Normal file
2
install/config/mimetypes.sh
Executable file → Normal file
2
install/config/mimetypes.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
omarchy-refresh-applications
|
||||
update-desktop-database ~/.local/share/applications
|
||||
|
||||
|
||||
23
install/config/mise-ruby.sh
Executable file → Normal file
23
install/config/mise-ruby.sh
Executable file → Normal file
@@ -1,7 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Install Ruby using gcc-14 for compatibility
|
||||
mise settings set ruby.ruby_build_opts "CC=gcc-14 CXX=g++-14"
|
||||
|
||||
# Trust .ruby-version
|
||||
mise settings add idiomatic_version_file_enable_tools ruby
|
||||
|
||||
# Install pre-built Ruby + Rails for x86_64
|
||||
if [[ $(uname -m) == "x86_64" ]]; then
|
||||
RUBY_VERSION="3.4.5"
|
||||
RUBY_TARBALL="ruby-${RUBY_VERSION}-rails-8.0.2.1-x86_64.tar.gz"
|
||||
RUBY_URL="https://pkgs.omarchy.org/ruby/${RUBY_TARBALL}"
|
||||
MISE_RUBY_DIR="$HOME/.local/share/mise/installs/ruby"
|
||||
OFFLINE_CACHE="/var/cache/omarchy/ruby"
|
||||
|
||||
mkdir -p "$MISE_RUBY_DIR"
|
||||
|
||||
if [[ ${OMARCHY_INSTALL_MODE:-offline} == "offline" ]]; then
|
||||
echo "Installing Ruby from offline cache..."
|
||||
tar -xzf "${OFFLINE_CACHE}/${RUBY_TARBALL}" -C "$MISE_RUBY_DIR"
|
||||
else
|
||||
echo "Downloading pre-built Ruby ${RUBY_VERSION}..."
|
||||
curl -fsSL "$RUBY_URL" | tar -xz -C "$MISE_RUBY_DIR"
|
||||
fi
|
||||
|
||||
mise use --global "ruby@${RUBY_VERSION}"
|
||||
fi
|
||||
|
||||
2
install/config/ssh-flakiness.sh
Executable file → Normal file
2
install/config/ssh-flakiness.sh
Executable file → Normal file
@@ -1,4 +1,2 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Solve common flakiness with SSH
|
||||
echo "net.ipv4.tcp_mtu_probing=1" | sudo tee -a /etc/sysctl.d/99-sysctl.conf
|
||||
|
||||
2
install/config/sudoless-asdcontrol.sh
Executable file → Normal file
2
install/config/sudoless-asdcontrol.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Setup sudo-less controls for controlling brightness on Apple Displays
|
||||
echo "$USER ALL=(ALL) NOPASSWD: /usr/local/bin/asdcontrol" | sudo tee /etc/sudoers.d/asdcontrol
|
||||
sudo chmod 440 /etc/sudoers.d/asdcontrol
|
||||
|
||||
3
install/config/theme.sh
Executable file → Normal file
3
install/config/theme.sh
Executable file → Normal file
@@ -1,9 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Set links for Nautilius action icons
|
||||
sudo ln -snf /usr/share/icons/Adwaita/symbolic/actions/go-previous-symbolic.svg /usr/share/icons/Yaru/scalable/actions/go-previous-symbolic.svg
|
||||
sudo ln -snf /usr/share/icons/Adwaita/symbolic/actions/go-next-symbolic.svg /usr/share/icons/Yaru/scalable/actions/go-next-symbolic.svg
|
||||
sudo gtk-update-icon-cache /usr/share/icons/Yaru
|
||||
|
||||
# Setup theme links
|
||||
mkdir -p ~/.config/omarchy/themes
|
||||
|
||||
2
install/config/timezones.sh
Executable file → Normal file
2
install/config/timezones.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Ensure timezone can be updated without needing to sudo
|
||||
sudo tee /etc/sudoers.d/omarchy-tzupdate >/dev/null <<EOF
|
||||
%wheel ALL=(root) NOPASSWD: /usr/bin/tzupdate, /usr/bin/timedatectl
|
||||
|
||||
2
install/config/xcompose.sh
Executable file → Normal file
2
install/config/xcompose.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Set default XCompose that is triggered with CapsLock
|
||||
tee ~/.XCompose >/dev/null <<EOF
|
||||
include "%H/.local/share/omarchy/default/xcompose"
|
||||
|
||||
Reference in New Issue
Block a user