installer: require target user for system finalizer

This commit is contained in:
Ryan Hughes
2026-06-04 18:35:01 -04:00
parent 67c401c125
commit bf14f69017
7 changed files with 19 additions and 10 deletions
+1 -1
View File
@@ -1 +1 @@
usermod -aG docker "${OMARCHY_INSTALL_USER:-${USER:-}}"
usermod -aG docker "$OMARCHY_INSTALL_USER"
+1 -1
View File
@@ -12,7 +12,7 @@ if lspci -nn | grep -q "106b:180[12]"; then
tiny-dfr
# Add user to video group (required for tiny-dfr to access /dev/dri devices)
usermod -aG video "${OMARCHY_INSTALL_USER:-${USER:-}}"
usermod -aG video "$OMARCHY_INSTALL_USER"
# Enable T2 services
systemctl enable t2fanrd.service
+1 -1
View File
@@ -1,2 +1,2 @@
# Give this user privileged input access for dictation tools + xbox controllers to work
usermod -aG input "${OMARCHY_INSTALL_USER:-${USER:-}}"
usermod -aG input "$OMARCHY_INSTALL_USER"
+1 -1
View File
@@ -7,7 +7,7 @@ autologin_conf=/etc/sddm.conf.d/autologin.conf
if [[ ! -f $autologin_conf ]]; then
cat > "$autologin_conf" <<EOF
[Autologin]
User=${OMARCHY_INSTALL_USER:-${USER:-}}
User=$OMARCHY_INSTALL_USER
Session=omarchy
EOF
else
+2 -3
View File
@@ -1,13 +1,12 @@
# 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_user="$OMARCHY_INSTALL_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 FIRST_RUN_CLEANUP = /usr/bin/rm -f /etc/sudoers.d/first-run, /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