1
0
Fork 0

moving work

This commit is contained in:
Luca Bilke 2023-05-30 23:34:39 +02:00
parent 8cfb5ee822
commit 72a7219d0d
No known key found for this signature in database
GPG Key ID: 7B77C51E8C779E75
4 changed files with 36 additions and 33 deletions

10
TODO
View File

@ -1,5 +1,5 @@
lf preview tools
ask user to set $LOCATION in .config/zsh/configs/host-setup
ask user to run arandr and save config script in .config/X11/xsession.d/40display-setup
run fc-cache to get fonts from dotfiles
@ -13,3 +13,11 @@ these files need to be created
.local/share/virtualenv/
.local/share/firefox/
.local/src/
rework progs.csv
look into necessary polkit/sudoers changes (power management, networkmanager stuff)
https://wiki.archlinux.org/title/NetworkManager#Set_up_PolicyKit_permissions
enable dbus: `ln -s /etc/sv/dbus /var/service/`
enable elogind `ln -s /etc/sv/elogind /var/service`

46
bootstrap.sh Normal file → Executable file
View File

@ -10,7 +10,7 @@ error() {
}
welcome() {
whiptail \
dialog \
--title "Welcome!" \
--msgbox \
"Welcome!\\n\\nThis script will automatically install a fully-featured Linux desktop with DWM and my dotfiles." \
@ -20,26 +20,26 @@ welcome() {
getlogin() {
# Prompts user for new username an password.
name=$(
whiptail \
dialog \
--inputbox "First, please enter a name for the user account." \
10 60 3>&1 1>&2 2>&3 3>&1
) || exit 1
while ! echo "$name" | grep -q "^[a-z_][a-z0-9_-]*$"; do
name=$(
whiptail \
dialog \
--nocancel \
--inputbox "Username not valid. Give a username beginning with a letter, with only lowercase letters, - or _." \
10 60 3>&1 1>&2 2>&3 3>&1
)
done
pass1=$(
whiptail \
dialog \
--nocancel \
--passwordbox "Enter a password for that user." \
10 60 3>&1 1>&2 2>&3 3>&1
)
pass2=$(
whiptail \
dialog \
--nocancel \
--passwordbox \
"Retype password." \
@ -48,13 +48,13 @@ getlogin() {
while ! [ "$pass1" = "$pass2" ]; do
unset pass2
pass1=$(
whiptail \
dialog \
--nocancel \
--passwordbox "Passwords do not match.\\n\\nEnter password again." \
10 60 3>&1 1>&2 2>&3 3>&1
)
pass2=$(
whiptail \
dialog \
--nocancel \
--passwordbox "Retype password." \
10 60 3>&1 1>&2 2>&3 3>&1
@ -64,7 +64,7 @@ getlogin() {
usercheck() {
if id -u "$name" >/dev/null 2>&1; then
whiptail \
dialog \
--title "WARNING" \
--yes-button "Continue" \
--no-button "Cancel" \
@ -76,11 +76,11 @@ sanitycheck() {
while IFS=, read -r tag program comment; do
case "$tag" in
# "G") ;;
"P") ;;
"C") ;;
"X") ;;
*) error "Incorrect installation tag for $program in progs.csv" ;;
esac
done
done < progs.csv
}
rootcheck() {
@ -88,13 +88,13 @@ rootcheck() {
}
preinstall() {
whiptail \
dialog \
--title "Confirmation" \
--yes-button "Start Installation" \
--no-button "Cancel" \
--yesno "The rest of the installation is automated." \
13 60 || clear && exit 1
whiptail \
dialog \
--title "XBPS Updates" \
--infobox "Updating XBPS Packages." \
10 60
@ -103,7 +103,7 @@ preinstall() {
addlogin() {
# Adds user `$name` with password $pass1.
whiptail \
dialog \
--infobox "Adding user \"$name\"..." \
7 50
useradd -m -g wheel -s /bin/zsh "$name" >/dev/null 2>&1 ||
@ -120,7 +120,7 @@ addlogin() {
}
installxbps() {
whiptail \
dialog \
--title "XBPS Installation" \
--infobox "Installing \`$1\` ($n of $total). $1 $2" \
9 70
@ -131,7 +131,7 @@ installxbps() {
# progname="${1##*/}"
# progname="${progname%.git}"
# dir="$repodir/$progname"
# whiptail \
# dialog \
# --title "Git Installation" \
# --infobox "Installing \`$progname\` ($n of $total) via \`git\` and \`make\`. $(basename "$1") $2" \
# 8 70
@ -148,7 +148,7 @@ installxbps() {
# }
installpip() {
whiptail \
dialog \
--title "Pip Installation" \
--infobox "Installing the Python package \`$1\` ($n of $total). $1 $2" 9 70
[ -x "$(command -v "pip")" ] || installpkg python-pip >/dev/null 2>&1
@ -156,7 +156,7 @@ installpip() {
}
initnvim() {
whiptail \
dialog \
--title "Installation" \
--infobox "Bootstrapping neovim" \
8 70
@ -178,7 +178,7 @@ installationloop() {
}
pulldots() {
whiptail \
dialog \
--infobox "Dowloading dotfiles" \
7 60
sudo -u "$name" \
@ -190,13 +190,13 @@ pulldots() {
initbootstrap() {
for package in curl ca-certificates base-devel git ntp zsh; do
whiptail \
dialog \
--title "Installation" \
--infobox "Installing \`$package\` which is required to install and configure other programs." \
8 70
install-xbps "$package"
done
whiptail \
dialog \
--title "Installation" \
--infobox "Making some required configurations." \
8 70
@ -206,7 +206,7 @@ initbootstrap() {
}
synctime() {
whiptail \
dialog \
--title "Installation" \
--infobox "Synchronizing system time to ensure successful and secure installation of software..." \
8 70
@ -214,7 +214,7 @@ synctime() {
}
finalize() {
whiptail \
dialog \
--title "Installation" \
--infobox "Cleaning up..." \
8 70
@ -223,7 +223,7 @@ finalize() {
}
goodbye() {
whiptail \
dialog \
--title "All done!" \
--msgbox "Unless this script has bugs (contact me at luca@snaile.de) the installation is finished\\n\\n\
To run the new graphical environment, log out and log back in as your new user, then run the command \"startgraphical\" to start the graphical environment (it will start automatically in tty1)." \

3
notes
View File

@ -1,3 +0,0 @@
enable dbus: `ln -s /etc/sv/dbus /var/service/`
enable elogind `ln -s /etc/sv/elogind /var/service`

View File

@ -29,7 +29,7 @@ xsecurelock
lf
psmisc
wget
picom
xcompmgr
xss-lock
playerctl
ntp
@ -44,6 +44,8 @@ lazygit
elogind
pamixer
xdg-utils
ffmpeg-thumbnailer
htop-vim
libX11-devel
#libxcb-devel
@ -53,13 +55,9 @@ libassuan-devel
libconfig-devel
gpgme-devel
-- to be removed --
htop
-- needed --
ffmpegthumbnailer
htop-vim
npm
networkmanager-dmenu
-- update needed --
dunst