home · contact · privacy
Various improvements to Raspi setup.
authorChristian Heller <c.heller@plomlompom.de>
Wed, 30 Oct 2024 21:29:37 +0000 (22:29 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Wed, 30 Oct 2024 21:29:37 +0000 (22:29 +0100)
many_releases/aptmark/raspi
many_releases/etc/raspi/greetd/config.toml
many_releases/home/raspi/.on_session_start.sh [new file with mode: 0755]
many_releases/home/raspi/.profile [new file with mode: 0644]
many_releases/home/raspi/profile [deleted file]
many_releases/home/raspi/startup.sh [deleted file]
many_releases/home/user/.config/sway/config
testing/scripts/setup_raspi.sh

index 79eb6837d79714c7970e3fbad54b285d35d75dbd..c8b8c571e096bdc2ac6dd905b98e5db01eb848f4 100644 (file)
@@ -5,11 +5,13 @@ raspi-firmware
 # to boot into a graphical environment
 greetd
 sway
+# for sound
+pulseaudio
+# for setting console keyboard via /etc/default/keyboard 
+console-setup
 # for convenience
 sudo
 vim
 ack
 foot
 mpv
-# for sound
-pulseaudio
index afbef593e2b769b788ffaa805f08e4cd7a0b82a0..d07e7c951875ac83e63431088ab704e470d65789 100644 (file)
@@ -1,5 +1,5 @@
 [terminal]
 vt = 7 
 [default_session]
-command = "/home/plom/startup.sh"
+command = "/home/plom/.on_session_start.sh"
 user = "plom"
diff --git a/many_releases/home/raspi/.on_session_start.sh b/many_releases/home/raspi/.on_session_start.sh
new file mode 100755 (executable)
index 0000000..bcbba4d
--- /dev/null
@@ -0,0 +1,13 @@
+#!/usr/bin/sh
+# Iinitalize anything we want in our sessions opened by greetd.
+
+# Workaround to pulseaudio daemon somehow not respecting setting these with
+# ~/.config/pulse/default.pa – note that the first pactl call also seems
+# necessary, probably for forcing some init routines without which the pacmd
+# calls that follow won't work; TODO: find cleaner solutions 
+pactl list sinks > /dev/null
+pacmd set-default-sink alsa_output.platform-fef05700.hdmi.hdmi-stereo
+pacmd set-sink-volume alsa_output.platform-fef05700.hdmi.hdmi-stereo 32768 
+
+# Wayland environment.
+/usr/bin/sway
diff --git a/many_releases/home/raspi/.profile b/many_releases/home/raspi/.profile
new file mode 100644 (file)
index 0000000..d8c6f59
--- /dev/null
@@ -0,0 +1,10 @@
+# ~/.profile: executed by the command interpreter for login shells.
+
+# simplified defaults: read .bashrc, extend PATH by bin dirs
+. "$HOME/.bashrc"
+PATH="$HOME/.local/bin:$HOME/bin:$PATH"
+
+# to forward video on commands run via SSH login to screen we expect connected 
+if [ -n "$SSH_CONNECTION" ]; then
+  export WAYLAND_DISPLAY=wayland-1 
+fi
diff --git a/many_releases/home/raspi/profile b/many_releases/home/raspi/profile
deleted file mode 100644 (file)
index d8c6f59..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-# ~/.profile: executed by the command interpreter for login shells.
-
-# simplified defaults: read .bashrc, extend PATH by bin dirs
-. "$HOME/.bashrc"
-PATH="$HOME/.local/bin:$HOME/bin:$PATH"
-
-# to forward video on commands run via SSH login to screen we expect connected 
-if [ -n "$SSH_CONNECTION" ]; then
-  export WAYLAND_DISPLAY=wayland-1 
-fi
diff --git a/many_releases/home/raspi/startup.sh b/many_releases/home/raspi/startup.sh
deleted file mode 100755 (executable)
index bcbba4d..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/sh
-# Iinitalize anything we want in our sessions opened by greetd.
-
-# Workaround to pulseaudio daemon somehow not respecting setting these with
-# ~/.config/pulse/default.pa – note that the first pactl call also seems
-# necessary, probably for forcing some init routines without which the pacmd
-# calls that follow won't work; TODO: find cleaner solutions 
-pactl list sinks > /dev/null
-pacmd set-default-sink alsa_output.platform-fef05700.hdmi.hdmi-stereo
-pacmd set-sink-volume alsa_output.platform-fef05700.hdmi.hdmi-stereo 32768 
-
-# Wayland environment.
-/usr/bin/sway
index d0981b301ded7ecfe03818cabbe35aedbd7dd53c..ccd2b504f00849c832b189b39bf485128b13968a 100644 (file)
@@ -1,3 +1,4 @@
 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"
index 0d21b1bcc960e36741639a062d648ea62eed4a3a..791bf51ec5957386bbdcd84889fe5e1754e72b90 100755 (executable)
@@ -17,9 +17,16 @@ rm "${FILENAME_PUBLIC_KEY}"
 
 upgrade_from_older_release
 
-# properly configure and apt system
+# 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}" '/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
@@ -27,8 +34,6 @@ for root in "${PATH_MANY}" '..'; do
     install_for_modules "${root}${PATH_REL_APTMARK}" all raspi
 done
 apt -y --purge autoremove
-
-# just in case anything got overwritten … 
 for root in "${PATH_MANY}" '..'; do
     copy_dirtree "${root}${PATH_REL_ETC}" '/etc' all raspi
 done