This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/bin/lib/sudo_setup
2020-11-05 21:32:01 -06:00

31 lines
829 B
Bash
Executable file

#!/usr/bin/env bash
if [[ $UID -ne 0 ]]; then
echo "Re-running with 'sudo -E'..."
sudo -E "$0" "$@"
exit
fi
dfp=$(cd "$(dirname "${BASH_SOURCE[0]}" )/../../" && pwd)
source "${dfp}/bin/lib/setup_helpers.bash"
links=(
# display manager files
"apps/de/sway/init" "/usr/bin/sway-lytedev"
"apps/de/sway/dm-entry" "/usr/share/wayland-sessions/sway-lytedev.desktop"
# udev rules
# TODO: how does this work in nix?
"apps/udev-rules/gcadapter" "/etc/udev/rules.d/51-gcadapter.rules"
# tmpfiles
# TODO: does this even do anything anymore?
"apps/tmpfiles/disable-lid-wakeup" "/etc/tmpfiles.d/disable-lid-wakeup.conf"
# lightdm
"apps/de/gnome/gdm-tap-to-click" "/etc/dconf/db/gdm.d/06-tap-to-click"
)
_dotfiles_setup_run_setup "$dfp/.agreed-to-erasing-root-files.lock" "${links[@]}"