omarchy/install/preflight/first-run-mode.sh
David Heinemeier Hansson 39e0cf3a37 Fix path
2025-08-25 08:38:07 +02:00

14 lines
464 B
Bash
Executable File

#!/bin/bash
# Set first-run mode marker so we can install stuff post-installation
mkdir -p ~/.local/state/omarchy
touch ~/.local/state/omarchy/first-run.mode
# Setup sudo-less access for first-run
sudo tee /etc/sudoers.d/first-run >/dev/null <<EOF
$USER ALL=(ALL) NOPASSWD: /usr/bin/ufw
$USER ALL=(ALL) NOPASSWD: /usr/bin/ufw-docker
$USER ALL=(ALL) NOPASSWD: /bin/rm -f /home/$USER/.local/state/omarchy/first-run.mode
EOF
sudo chmod 440 /etc/sudoers.d/first-run