pulseaudio
# for setting console keyboard via /etc/default/keyboard
console-setup
+# for setting system time
+ntpsec-ntpdate
+# basic usage
+mpv
+firefox-esr
# for convenience
+foot
sudo
vim
ack
-foot
-mpv
--- /dev/null
+LANG="en_US.UTF-8"
--- /dev/null
+include /etc/sway/config
+output * background #551199 solid_color
+bindsym $mod+Shift+p exec swaynag -t warning -m 'Really exit sway/end Wayland session?' -B 'Yes, exit sway' 'swaymsg exit'
+input * xkb_layout "de"
+++ /dev/null
-include /etc/sway/config
-output * background #551199 solid_color
-bindsym $mod+Shift+p exec swaynag -t warning -m 'Really exit sway/end Wayland session?' -B 'Yes, exit sway' 'swaymsg exit'
-input * xkb_layout "de"
apt -y -o Dpkg::Options::='--force-confnew' full-upgrade
apt -y autoremove
}
+
+add_my_public_key() {
+ # NB: vars expected to be pulled in from caller previously calling constants.sh!
+ apt update
+ apt -y install wget
+ wget "${URL_PUBLIC_KEY}"
+ cat "${FILENAME_PUBLIC_KEY}" >> "${PATH_AUTHORIZED_KEYS}"
+ rm "${FILENAME_PUBLIC_KEY}"
+}
+
+setup_for_desktop() {
+ # NB: vars expected to be pulled in from caller previously calling constants.sh!
+
+ # on installing console-setup, will guide it to do the right thing (including
+ # re-writing /etc/default/keyboard)
+ echo 'XKBLAYOUT=de' > /etc/default/keyboard
+
+ # properly configure apt and reduce system to minimum that satisfies our own
+ # aptmark/ package lists
+ for root in "${PATH_MANY}" '..'; do
+ copy_dirtree "${root}${PATH_REL_ETC}/all" '/etc/apt' apt
+ done
+ apt update
+ mark_nonrequireds_auto
+ for root in "${PATH_MANY}" '..'; do
+ install_for_modules "${root}${PATH_REL_APTMARK}" all $@
+ done
+ apt -y --purge autoremove
+ for root in "${PATH_MANY}" '..'; do
+ copy_dirtree "${root}${PATH_REL_ETC}" '/etc' all $@
+ done
+
+ # Ensure our desired locale is available.
+ locale-gen
+
+ # Set Berlin localtime.
+ ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
+ ntpdate-debian
+
+ # so Sway won't complain about failing to access non-existant background image file
+ sed -i '/^output \* bg/ s/^/#/' /etc/sway/config
+
+ # Set up root environment.
+ for root in "${PATH_MANY}" '..'; do
+ copy_dirtree "${root}${PATH_REL_HOME}" '/root' all root
+ done
+
+ # Set up user and their environment.
+ adduser --disabled-password --gecos "" "${USERNAME}"
+ usermod -a -G sudo "${USERNAME}"
+ for root in "${PATH_MANY}" '..'; do
+ copy_dirtree "${root}${PATH_REL_HOME}" "${PATH_USER_HOME}" all desktop $@
+ done
+ cp -a "${PATH_REPO}" "${PATH_USER_HOME}"
+ mkdir "${PATH_USER_SSH}"
+ cp "${PATH_AUTHORIZED_KEYS}" "${PATH_USER_SSH}"
+ chown -R "${USERNAME}:${USERNAME}" "${PATH_USER_HOME}"
+ passwd "${USERNAME}"
+ rm "${PATH_AUTHORIZED_KEYS}"
+}
+++ /dev/null
-LANG="en_US.UTF-8"
-#!/bin/sh
+#!/bin/sh
set -e
set -x
. ../../constants.sh
. "${PATH_MANY_MISC}"
# ensure we can log in
+add_my_public_key
# (alternatively, or preceding this to reduce non-remote typing, TEMPORARILY
# (!) set password login:)
# passwd
# echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config
-apt update
-apt -y install wget
-wget "${URL_PUBLIC_KEY}"
-cat "${FILENAME_PUBLIC_KEY}" >> "${PATH_AUTHORIZED_KEYS}"
-rm "${FILENAME_PUBLIC_KEY}"
+# migrate to testing
upgrade_from_older_release
-# on installing console-setup, will guide it to do the right thing (including
-# re-writing /etc/default/keyboard)
-echo 'XKBLAYOUT=de' > /etc/default/keyboard
-
-# properly configure apt and reduce system to minimum that satisfies our own
-# aptmark/ package lists
-for root in "${PATH_MANY}" '..'; do
- # copy_dirtree "${root}${PATH_REL_ETC}" '/etc' all raspi
- copy_dirtree "${root}${PATH_REL_ETC}/all" '/etc/apt' apt
- copy_dirtree "${root}${PATH_REL_ETC}/raspi" '/etc/apt' apt
-done
-apt update
-mark_nonrequireds_auto
-for root in "${PATH_MANY}" '..'; do
- install_for_modules "${root}${PATH_REL_APTMARK}" all raspi
-done
-apt -y --purge autoremove
-for root in "${PATH_MANY}" '..'; do
- copy_dirtree "${root}${PATH_REL_ETC}" '/etc' all raspi
-done
-
-# Ensure our desired locale is available.
-locale-gen
-
-# Set Berlin localtime.
-ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
-
-# so Sway won't complain about failing to access non-existant background image file
-sed -i '/^output \* bg/ s/^/#/' /etc/sway/config
-
-# Set up root environment.
-for root in "${PATH_MANY}" '..'; do
- copy_dirtree "${root}${PATH_REL_HOME}" '/root' all root
-done
-
-# Set up user and their environment.
-adduser --disabled-password --gecos "" "${USERNAME}"
-usermod -a -G sudo "${USERNAME}"
-for root in "${PATH_MANY}" '..'; do
- copy_dirtree "${root}${PATH_REL_HOME}" "${PATH_USER_HOME}" all user raspi
-done
-cp -a "${PATH_REPO}" "${PATH_USER_HOME}"
-mkdir "${PATH_USER_SSH}"
-cp "${PATH_AUTHORIZED_KEYS}" "${PATH_USER_SSH}"
-chown -R "${USERNAME}:${USERNAME}" "${PATH_USER_HOME}"
-passwd "${USERNAME}"
-rm "${PATH_AUTHORIZED_KEYS}"
+# actual setup
+setup_for_desktop raspi