install: add split system and user targets
This commit is contained in:
@@ -0,0 +1 @@
|
||||
../bt-agent.service
|
||||
@@ -0,0 +1 @@
|
||||
../omarchy-sleep-lock.service
|
||||
@@ -0,0 +1,2 @@
|
||||
[Theme]
|
||||
Current=omarchy
|
||||
@@ -0,0 +1,5 @@
|
||||
[General]
|
||||
DisplayServer=wayland
|
||||
|
||||
[Wayland]
|
||||
CompositorCommand=start-hyprland -- --config /usr/share/sddm/hyprland.lua
|
||||
@@ -0,0 +1,2 @@
|
||||
[Manager]
|
||||
DefaultLimitNOFILE=65536:524288
|
||||
@@ -0,0 +1,2 @@
|
||||
[Manager]
|
||||
DefaultLimitNOFILE=65536:524288
|
||||
@@ -0,0 +1,9 @@
|
||||
mkdir -p ~/.config/wireplumber/wireplumber.conf.d/
|
||||
cp "$OMARCHY_PATH/default/wireplumber/wireplumber.conf.d/bluetooth-a2dp-autoconnect.conf" ~/.config/wireplumber/wireplumber.conf.d/
|
||||
|
||||
# Quickshell.Bluetooth has no Agent API, so the omarchy.bluetooth plugin
|
||||
# can't answer the auth prompts bluez issues during pair(). bt-agent registers
|
||||
# a NoInputNoOutput agent on the system bus so pair() actually completes.
|
||||
mkdir -p ~/.config/systemd/user/
|
||||
cp "$OMARCHY_PATH/config/systemd/user/bt-agent.service" ~/.config/systemd/user/
|
||||
systemctl --user enable bt-agent.service
|
||||
@@ -0,0 +1,21 @@
|
||||
envs="$HOME/.config/hypr/envs.lua"
|
||||
[[ -f $envs ]] || exit 0
|
||||
|
||||
if lspci | grep -qi 'nvidia'; then
|
||||
if omarchy-hw-nvidia-gsp && ! grep -q 'NVIDIA (Turing+ with GSP firmware)' "$envs"; then
|
||||
cat >>"$envs" <<'EOF'
|
||||
|
||||
-- NVIDIA (Turing+ with GSP firmware)
|
||||
hl.env("NVD_BACKEND", "direct")
|
||||
hl.env("LIBVA_DRIVER_NAME", "nvidia")
|
||||
hl.env("__GLX_VENDOR_LIBRARY_NAME", "nvidia")
|
||||
EOF
|
||||
elif omarchy-hw-nvidia-without-gsp && ! grep -q 'NVIDIA (Maxwell/Pascal/Volta without GSP firmware)' "$envs"; then
|
||||
cat >>"$envs" <<'EOF'
|
||||
|
||||
-- NVIDIA (Maxwell/Pascal/Volta without GSP firmware)
|
||||
hl.env("NVD_BACKEND", "egl")
|
||||
hl.env("__GLX_VENDOR_LIBRARY_NAME", "nvidia")
|
||||
EOF
|
||||
fi
|
||||
fi
|
||||
@@ -0,0 +1,15 @@
|
||||
# Set links for Nautilus action icons
|
||||
mkdir -p /usr/share/icons/Yaru/scalable/actions
|
||||
ln -snf /usr/share/icons/Adwaita/symbolic/actions/go-previous-symbolic.svg \
|
||||
/usr/share/icons/Yaru/scalable/actions/go-previous-symbolic.svg
|
||||
ln -snf /usr/share/icons/Adwaita/symbolic/actions/go-next-symbolic.svg \
|
||||
/usr/share/icons/Yaru/scalable/actions/go-next-symbolic.svg
|
||||
|
||||
# Chromium policy directory for theme
|
||||
mkdir -p /etc/chromium/policies/managed
|
||||
chmod a+rw /etc/chromium/policies/managed
|
||||
|
||||
# Default Chromium to follow system appearance ("device") instead of dark
|
||||
mkdir -p /usr/lib/chromium
|
||||
echo '{"browser":{"theme":{"color_scheme":0,"color_scheme2":0}}}' > \
|
||||
/usr/lib/chromium/initial_preferences
|
||||
@@ -0,0 +1,16 @@
|
||||
# Setup user theme folder
|
||||
mkdir -p ~/.config/omarchy/themes
|
||||
|
||||
# Set initial theme. Offline ISO installs only need the user's theme files and
|
||||
# symlinks seeded; there is no running desktop/session bus in the chroot, so
|
||||
# skip shell IPC, dconf, app retint hooks, and background transition work.
|
||||
if install_mode_is offline; then
|
||||
OMARCHY_THEME_OFFLINE=1 OMARCHY_THEME_SKIP_BACKGROUND=1 omarchy-theme-set "Tokyo Night"
|
||||
else
|
||||
omarchy-theme-set "Tokyo Night"
|
||||
fi
|
||||
rm -rf ~/.config/chromium/SingletonLock # otherwise archiso will own the chromium singleton
|
||||
|
||||
# Set specific app links for current theme
|
||||
mkdir -p ~/.config/btop/themes
|
||||
ln -snf ~/.config/omarchy/current/theme/btop.theme ~/.config/btop/themes/current.theme
|
||||
@@ -0,0 +1,10 @@
|
||||
run_logged $OMARCHY_INSTALL/config/theme-user.sh
|
||||
run_logged $OMARCHY_INSTALL/config/git.sh
|
||||
run_logged $OMARCHY_INSTALL/config/xcompose.sh
|
||||
run_logged $OMARCHY_INSTALL/config/mise-work.sh
|
||||
run_logged $OMARCHY_INSTALL/config/sleep-lock.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/bluetooth-user.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-audio-mixer.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-mic.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/framework/fix-f13-amd-audio-input.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/nvidia-user.sh
|
||||
@@ -0,0 +1 @@
|
||||
sudo gtk-update-icon-cache /usr/share/icons/Yaru
|
||||
@@ -0,0 +1,3 @@
|
||||
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark"
|
||||
gsettings set org.gnome.desktop.interface color-scheme "prefer-dark"
|
||||
gsettings set org.gnome.desktop.interface icon-theme "Yaru-blue"
|
||||
@@ -0,0 +1,5 @@
|
||||
run_logged $OMARCHY_INSTALL/login/sddm.sh
|
||||
if install_mode_is online; then
|
||||
run_logged $OMARCHY_INSTALL/login/hibernation.sh
|
||||
fi
|
||||
run_logged $OMARCHY_INSTALL/login/limine-snapper.sh
|
||||
@@ -0,0 +1,4 @@
|
||||
run_logged $OMARCHY_INSTALL/packaging/asus-rog.sh
|
||||
run_logged $OMARCHY_INSTALL/packaging/framework16.sh
|
||||
run_logged $OMARCHY_INSTALL/packaging/dell-xps-touchpad-haptics.sh
|
||||
run_logged $OMARCHY_INSTALL/packaging/surface.sh
|
||||
@@ -0,0 +1 @@
|
||||
run_logged $OMARCHY_INSTALL/packaging/nvim.sh
|
||||
@@ -0,0 +1,19 @@
|
||||
# Setup sudo-less access for the privileged first-run system one-shot. The
|
||||
# install user's ~/.local/state/omarchy/first-run.mode marker is created by
|
||||
# finalize.sh while running as that user.
|
||||
install_user="${OMARCHY_INSTALL_USER:-${USER:-}}"
|
||||
install_mode_is offline || exit 0
|
||||
[[ -n $install_user ]] || exit 0
|
||||
|
||||
mkdir -p /etc/sudoers.d
|
||||
cat > /etc/sudoers.d/first-run <<EOF
|
||||
Cmnd_Alias FIRST_RUN_CLEANUP = /bin/rm -f /etc/sudoers.d/first-run
|
||||
Cmnd_Alias SYMLINK_RESOLVED = /usr/bin/ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
|
||||
$install_user ALL=(ALL) NOPASSWD: /usr/bin/systemctl
|
||||
$install_user ALL=(ALL) NOPASSWD: /usr/bin/ufw
|
||||
$install_user ALL=(ALL) NOPASSWD: /usr/bin/ufw-docker
|
||||
$install_user ALL=(ALL) NOPASSWD: /usr/bin/gtk-update-icon-cache
|
||||
$install_user ALL=(ALL) NOPASSWD: SYMLINK_RESOLVED
|
||||
$install_user ALL=(ALL) NOPASSWD: FIRST_RUN_CLEANUP
|
||||
EOF
|
||||
chmod 440 /etc/sudoers.d/first-run
|
||||
@@ -0,0 +1,5 @@
|
||||
# Remove legacy paths replaced by package-owned Omarchy defaults.
|
||||
rm -f /etc/udev/rules.d/99-power-profile.rules
|
||||
rm -f /etc/udev/rules.d/99-wifi-powersave.rules
|
||||
rm -f /etc/systemd/system.conf.d/99-omarchy-nofile.conf
|
||||
rm -f /etc/systemd/user.conf.d/99-omarchy-nofile.conf
|
||||
@@ -0,0 +1,4 @@
|
||||
# Update localdb so locate can find the installed system files immediately.
|
||||
if omarchy-cmd-present updatedb; then
|
||||
updatedb
|
||||
fi
|
||||
@@ -0,0 +1,8 @@
|
||||
run_logged $OMARCHY_INSTALL/post-install/first-run-mode.sh
|
||||
run_logged $OMARCHY_INSTALL/post-install/pacman.sh
|
||||
run_logged $OMARCHY_INSTALL/post-install/legacy-cleanup.sh
|
||||
run_logged $OMARCHY_INSTALL/post-install/udev.sh
|
||||
run_logged $OMARCHY_INSTALL/post-install/localdb.sh
|
||||
if install_mode_is online; then
|
||||
run_logged $OMARCHY_INSTALL/post-install/allow-reboot.sh
|
||||
fi
|
||||
@@ -0,0 +1,3 @@
|
||||
# Apply package-owned udev rules for the live install session when possible.
|
||||
udevadm control --reload 2>/dev/null || true
|
||||
udevadm trigger --subsystem-match=power_supply 2>/dev/null || true
|
||||
@@ -0,0 +1,6 @@
|
||||
# System-level install work. Keep the actual logic in the same atomic
|
||||
# packaging/config/login/post-install scripts used by the online installer.
|
||||
source $OMARCHY_INSTALL/packaging/system.sh
|
||||
source $OMARCHY_INSTALL/config/all.sh
|
||||
source $OMARCHY_INSTALL/login/system.sh
|
||||
source $OMARCHY_INSTALL/post-install/system.sh
|
||||
@@ -0,0 +1,3 @@
|
||||
source $OMARCHY_INSTALL/packaging/user.sh
|
||||
source $OMARCHY_INSTALL/config/user.sh
|
||||
run_logged $OMARCHY_INSTALL/login/default-keyring.sh
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# System-level Omarchy install work. This intentionally runs as root inside
|
||||
# the target system. User-home setup stays in finalize.sh.
|
||||
|
||||
export OMARCHY_INSTALL_LOG_FILE="${OMARCHY_INSTALL_LOG_FILE:-/var/log/omarchy-install.log}"
|
||||
|
||||
set -eEo pipefail
|
||||
|
||||
_OMARCHY_INSTALLER_DIR=$(dirname "$(realpath "${BASH_SOURCE[0]}")")
|
||||
export OMARCHY_PATH="${OMARCHY_PATH:-$_OMARCHY_INSTALLER_DIR}"
|
||||
export OMARCHY_INSTALL="${OMARCHY_INSTALL:-$_OMARCHY_INSTALLER_DIR/install}"
|
||||
export PATH="${OMARCHY_PATH}/bin:$_OMARCHY_INSTALLER_DIR/bin:$PATH"
|
||||
|
||||
source "$OMARCHY_INSTALL/helpers/mode.sh"
|
||||
detect_install_mode
|
||||
export_legacy_mode_flags
|
||||
source "$OMARCHY_INSTALL/helpers/chroot.sh"
|
||||
source "$OMARCHY_INSTALL/helpers/logging.sh"
|
||||
|
||||
if (( EUID != 0 )); then
|
||||
echo "Error: system-finalize.sh must run as root" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source "$OMARCHY_INSTALL/system/all.sh"
|
||||
Reference in New Issue
Block a user