adding install script for alpine. - dotfiles - These are my dotfiles. There are many like it, but these are mine.
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit 484cfeac42c07d4d023f78d87d255ce4ca104d71
(DIR) parent 2d737ed1c32cb0304c00d627570d6099ec7927d8
(HTM) Author: Jay Scott <me@jay.scot>
Date: Sun, 25 Sep 2022 16:34:27 +0100
adding install script for alpine.
Diffstat:
M bootstrap.sh | 2 +-
A install.sh | 90 +++++++++++++++++++++++++++++++
M pkg/archlinux | 4 ++++
M sway/config | 1 +
4 files changed, 96 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/bootstrap.sh b/bootstrap.sh
@@ -4,7 +4,7 @@ DOTFILES=$(pwd)
FILES='bashrc profile vimrc castgetrc'
ROOT='bin'
-CONFIG='fdm foot git mpd mutt ncmpcpp qutebrowser sfeed senpai sway waybar'
+CONFIG='fdm foot git mpd mutt ncmpcpp qutebrowser sfeed senpai sway'
AUR='paru'
link() {
(DIR) diff --git a/install.sh b/install.sh
@@ -0,0 +1,90 @@
+#!/usr/bin/env sh
+# https://git.sr.ht/~proycon/alpine-desktop-dotfiles/blob/master/install.sh
+
+usage() {
+ echo "Usage: install.sh [options] username" >&2
+ echo "Options:" >&2
+ echo " -u [user] Create and configure for user" >&2
+}
+
+die() {
+ echo "$*" >&2
+ exit 2
+}
+
+user=""
+
+while getopts ":hVu:x:Us:" arg; do
+ case ${arg} in
+ h)
+ usage
+ exit 0
+ ;;
+ u)
+ user="$OPTARG"
+ ;;
+ ?)
+ echo "Invalid option: -${OPTARG}."
+ exit 2
+ ;;
+ esac
+done
+
+if [ -z "$user" ]; then
+ echo "Error: Please specify the -u option, it is mandatory." >&2
+ usage
+ exit 2
+fi
+
+echo "=== Enable community repo ===" >&2
+sed -i '/v3\..*\/community/s/^#//g' /etc/apk/repositories
+
+echo "=== Updating base system ===" >&2
+apk update || die "update failed"
+apk upgrade -a || die "upgrade failed"
+
+#command-line essentials
+echo "=== installing command-line essentials ===" >&2
+apk add curl wget git vim tar zip gzip bzip2 rsync build-base less || die "failure installing command-line essentials"
+
+#basic wayland
+echo "=== Installing Wayland system ===" >&2
+apk add mesa-dri-gallium eudev font-hack seatd sway foot bemenu xwayland || die "failure installing basic X system"
+
+setup-udev || die "udev setup failed"
+
+#basic X tools
+echo "=== Installing tools ===" >&2
+apk add mpv zathura-pdf-mupdf firefox mutt mpd ncmpcpp lynx || die "failure installing tools"
+
+setup-udev || die "udev setup failed"
+
+echo "=== Installing audio ===" >&2
+apk add dbus dbus-openrc pipewire wireplumber rtkit pipewire-alsa || die "failure installing tools"
+
+echo "=== Bluetooth setup ===" >&2
+apk add bluez bluez-openrc pipewire-spa-bluez || die "failure installing tools"
+
+echo "=== installing documentation ===" >&2
+apk add mandoc mandoc-apropos man-pages docs || die "failure installing documentation"
+
+if [ ! -d "/home/$user" ]; then
+ echo "=== Creating user ===" >&2
+ #add user
+ adduser "$user" || die "unable to add user"
+ usermod -G audio,wheel,input,video,seat,rtkit -a -s /bin/ash "$user" || die "unable to add groups"
+ mkdir "/home/$user/.config"
+
+fi
+
+echo "=== Starting services ===" >&2
+rc-update add seatd
+rc-service seatd start
+
+rc-update add dbus default
+rc-service dbus start
+
+rc-update add bluetooth
+rc-service bluetooth start
+
+echo "Not included by default: printer (do apk add cups && rc-update add cupsd)" >&2
(DIR) diff --git a/pkg/archlinux b/pkg/archlinux
@@ -13,6 +13,7 @@ binutils
bison
bluez-utils
borg
+calibre
campdown
castget
checkbashisms
@@ -89,6 +90,9 @@ ntp
ocl-icd
openssh
openssl-1.0
+openttd
+openttd-opengfx
+openttd-opensfx
pacman-contrib
pamixer
paru
(DIR) diff --git a/sway/config b/sway/config
@@ -18,6 +18,7 @@ set $vol pamixer
exec wlsunset -l 57.6495 -L 3.318
exec mpd
exec wl-paste -t text --watch clipman store --no-persist
+#exec /usr/libexec/pipewire-launcher
# apperance
default_border none