migrations: keep system helpers sudo-compatible

This commit is contained in:
Ryan Hughes
2026-06-04 18:35:01 -04:00
parent bf14f69017
commit 27f6d9d364
12 changed files with 27 additions and 27 deletions
@@ -1,4 +1,4 @@
# Ensure we use system python3 and not mise's python3 # Ensure we use system python3 and not mise's python3
if [[ -f /usr/bin/powerprofilesctl ]]; then if [[ -f /usr/bin/powerprofilesctl ]]; then
sed -i '/env python3/ c\#!/bin/python3' /usr/bin/powerprofilesctl sudo sed -i '/env python3/ c\#!/bin/python3' /usr/bin/powerprofilesctl
fi fi
@@ -4,12 +4,12 @@ if [[ $product_name =~ MacBook[89],1|MacBook1[02],1|MacBookPro13,[123]|MacBookPr
echo "Detected MacBook with SPI keyboard" echo "Detected MacBook with SPI keyboard"
omarchy-pkg-add macbook12-spi-driver-dkms omarchy-pkg-add macbook12-spi-driver-dkms
mkdir -p /etc/mkinitcpio.conf.d sudo mkdir -p /etc/mkinitcpio.conf.d
if [[ $product_name == "MacBook8,1" ]]; then if [[ $product_name == "MacBook8,1" ]]; then
echo "MODULES=(applespi spi_pxa2xx_platform spi_pxa2xx_pci)" > \ echo "MODULES=(applespi spi_pxa2xx_platform spi_pxa2xx_pci)" | \
/etc/mkinitcpio.conf.d/macbook_spi_modules.conf sudo tee /etc/mkinitcpio.conf.d/macbook_spi_modules.conf >/dev/null
else else
echo "MODULES=(applespi intel_lpss_pci spi_pxa2xx_platform)" > \ echo "MODULES=(applespi intel_lpss_pci spi_pxa2xx_platform)" | \
/etc/mkinitcpio.conf.d/macbook_spi_modules.conf sudo tee /etc/mkinitcpio.conf.d/macbook_spi_modules.conf >/dev/null
fi fi
fi fi
@@ -10,8 +10,8 @@ if [[ $MACBOOK_MODEL =~ MacBook(8,1|9,1|10,1)|MacBookPro13,[123]|MacBookPro14,[1
if [[ -f $NVME_DEVICE ]]; then if [[ -f $NVME_DEVICE ]]; then
echo "Applying NVMe suspend fix..." echo "Applying NVMe suspend fix..."
mkdir -p /etc/systemd/system sudo mkdir -p /etc/systemd/system
cat > /etc/systemd/system/omarchy-nvme-suspend-fix.service <<'EOF' sudo tee /etc/systemd/system/omarchy-nvme-suspend-fix.service >/dev/null <<'EOF'
[Unit] [Unit]
Description=Omarchy NVMe Suspend Fix for MacBook Description=Omarchy NVMe Suspend Fix for MacBook
@@ -22,7 +22,7 @@ ExecStart=/bin/bash -c 'echo 0 > /sys/bus/pci/devices/0000\:01\:00.0/d3cold_allo
WantedBy=multi-user.target WantedBy=multi-user.target
EOF EOF
systemctl enable omarchy-nvme-suspend-fix.service sudo systemctl enable omarchy-nvme-suspend-fix.service
else else
echo "Warning: NVMe device not found at expected PCI address (0000:01:00.0)" echo "Warning: NVMe device not found at expected PCI address (0000:01:00.0)"
echo "This fix may not be needed for this MacBook model" echo "This fix may not be needed for this MacBook model"
@@ -8,8 +8,8 @@
# but produce no visible change; brightness is effectively binary. # but produce no visible change; brightness is effectively binary.
if omarchy-hw-asus-expertbook-b9406 || omarchy-hw-asus-zenbook-ux5406aa; then if omarchy-hw-asus-expertbook-b9406 || omarchy-hw-asus-zenbook-ux5406aa; then
mkdir -p /etc/limine-entry-tool.d sudo mkdir -p /etc/limine-entry-tool.d
cat > /etc/limine-entry-tool.d/asus-ptl-display-backlight.conf <<'EOF' sudo tee /etc/limine-entry-tool.d/asus-ptl-display-backlight.conf >/dev/null <<'EOF'
# ASUS Panther Lake display backlight fix # ASUS Panther Lake display backlight fix
KERNEL_CMDLINE[default]+=" xe.enable_dpcd_backlight=1" KERNEL_CMDLINE[default]+=" xe.enable_dpcd_backlight=1"
EOF EOF
@@ -11,8 +11,8 @@
# so dwt can properly pair it with the keyboard. # so dwt can properly pair it with the keyboard.
if omarchy-hw-asus-rog && omarchy-hw-match "GZ302"; then if omarchy-hw-asus-rog && omarchy-hw-match "GZ302"; then
mkdir -p /etc/udev/rules.d sudo mkdir -p /etc/udev/rules.d
cat > /etc/udev/rules.d/99-omarchy-asus-z13-touchpad.rules <<'EOF' sudo tee /etc/udev/rules.d/99-omarchy-asus-z13-touchpad.rules >/dev/null <<'EOF'
ACTION=="add|change", KERNEL=="event*", ATTRS{idVendor}=="0b05", ATTRS{idProduct}=="1a30", ENV{ID_INPUT_TOUCHPAD}=="1", ENV{ID_INPUT_TOUCHPAD_INTEGRATION}="internal" ACTION=="add|change", KERNEL=="event*", ATTRS{idVendor}=="0b05", ATTRS{idProduct}=="1a30", ENV{ID_INPUT_TOUCHPAD}=="1", ENV{ID_INPUT_TOUCHPAD_INTEGRATION}="internal"
EOF EOF
fi fi
+2 -2
View File
@@ -1,5 +1,5 @@
# Ensure that F-keys on Apple-like keyboards (such as Lofree Flow84) are always F-keys # 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 if [[ ! -f /etc/modprobe.d/hid_apple.conf ]]; then
mkdir -p /etc/modprobe.d sudo mkdir -p /etc/modprobe.d
echo "options hid_apple fnmode=2" > /etc/modprobe.d/hid_apple.conf echo "options hid_apple fnmode=2" | sudo tee /etc/modprobe.d/hid_apple.conf >/dev/null
fi fi
+2 -2
View File
@@ -1,8 +1,8 @@
# Allow unprivileged access to the Framework 16 keyboard for RGB control via qmk_hid. # Allow unprivileged access to the Framework 16 keyboard for RGB control via qmk_hid.
if omarchy-hw-framework16; then if omarchy-hw-framework16; then
mkdir -p /etc/udev/rules.d sudo mkdir -p /etc/udev/rules.d
if [[ ! -f /etc/udev/rules.d/50-framework16-qmk-hid.rules ]]; then if [[ ! -f /etc/udev/rules.d/50-framework16-qmk-hid.rules ]]; then
cp -f "$OMARCHY_PATH/default/udev/framework16-qmk-hid.rules" /etc/udev/rules.d/50-framework16-qmk-hid.rules sudo cp -f "$OMARCHY_PATH/default/udev/framework16-qmk-hid.rules" /etc/udev/rules.d/50-framework16-qmk-hid.rules
fi fi
fi fi
+5 -5
View File
@@ -4,15 +4,15 @@ DROP_IN="/etc/limine-entry-tool.d/intel-panther-lake-fred.conf"
DEFAULT_LIMINE="/etc/default/limine" DEFAULT_LIMINE="/etc/default/limine"
if omarchy-hw-intel-ptl; then if omarchy-hw-intel-ptl; then
if [[ ! -f "$DROP_IN" ]] || ! grep -q 'fred=on' "$DROP_IN"; then if [[ ! -f $DROP_IN ]] || ! grep -q 'fred=on' "$DROP_IN"; then
mkdir -p /etc/limine-entry-tool.d sudo mkdir -p /etc/limine-entry-tool.d
cat > "$DROP_IN" <<EOF cat <<EOF | sudo tee "$DROP_IN" >/dev/null
# Intel Panther Lake FRED support # Intel Panther Lake FRED support
KERNEL_CMDLINE[default]+=" fred=on" KERNEL_CMDLINE[default]+=" fred=on"
EOF EOF
fi fi
if [[ -f "$DEFAULT_LIMINE" ]] && ! grep -q 'fred=on' "$DEFAULT_LIMINE"; then if [[ -f $DEFAULT_LIMINE ]] && ! grep -q 'fred=on' "$DEFAULT_LIMINE"; then
cat "$DROP_IN" >> "$DEFAULT_LIMINE" cat "$DROP_IN" | sudo tee -a "$DEFAULT_LIMINE" >/dev/null
fi fi
fi fi
+1 -1
View File
@@ -6,6 +6,6 @@ if omarchy-hw-intel && omarchy-battery-present; then
cpu_model=$(grep -m1 "^model\s*:" /proc/cpuinfo 2>/dev/null | cut -d: -f2 | tr -d ' ') cpu_model=$(grep -m1 "^model\s*:" /proc/cpuinfo 2>/dev/null | cut -d: -f2 | tr -d ' ')
if [[ "$cpu_model" =~ ^(151|154|170|172|183|186|189|191|204)$ ]]; then if [[ "$cpu_model" =~ ^(151|154|170|172|183|186|189|191|204)$ ]]; then
omarchy-pkg-add intel-lpmd omarchy-pkg-add intel-lpmd
systemctl enable intel_lpmd.service sudo systemctl enable intel_lpmd.service
fi fi
fi fi
+1 -1
View File
@@ -7,6 +7,6 @@ if omarchy-hw-intel; then
cpu_model=${cpu_model:-0} cpu_model=${cpu_model:-0}
if ((cpu_model >= 42)) && omarchy-battery-present; then if ((cpu_model >= 42)) && omarchy-battery-present; then
omarchy-pkg-add thermald omarchy-pkg-add thermald
systemctl enable thermald.service sudo systemctl enable thermald.service
fi fi
fi fi
@@ -4,8 +4,8 @@
# Reference: https://wiki.archlinux.org/title/Lenovo_Yoga_9i_2022_(14AiPI7) # Reference: https://wiki.archlinux.org/title/Lenovo_Yoga_9i_2022_(14AiPI7)
if omarchy-hw-match "Yoga Pro 7 14IAH10"; then if omarchy-hw-match "Yoga Pro 7 14IAH10"; then
mkdir -p /etc/modprobe.d sudo mkdir -p /etc/modprobe.d
cat > /etc/modprobe.d/lenovo-yoga-pro7-bass.conf <<'EOF' sudo tee /etc/modprobe.d/lenovo-yoga-pro7-bass.conf >/dev/null <<'EOF'
options snd-sof-intel-hda-generic hda_model=alc287-yoga9-bass-spk-pin options snd-sof-intel-hda-generic hda_model=alc287-yoga9-bass-spk-pin
EOF EOF
fi fi
@@ -20,5 +20,5 @@ if [[ ! $country =~ ^[A-Z]{2}$ && -n $timezone && -f $zone_tab ]]; then
fi fi
if [[ $country =~ ^[A-Z]{2}$ ]]; then if [[ $country =~ ^[A-Z]{2}$ ]]; then
echo "WIRELESS_REGDOM=\"$country\"" >> "$regdom_file" echo "WIRELESS_REGDOM=\"$country\"" | sudo tee -a "$regdom_file" >/dev/null
fi fi