home · contact · privacy
Move TO_INSTALL into dedicated config file.
authorPlom Heller <plom@plomlompom.com>
Mon, 7 Sep 2026 04:48:42 +0000 (06:48 +0200)
committerPlom Heller <plom@plomlompom.com>
Mon, 7 Sep 2026 04:48:42 +0000 (06:48 +0200)
setup_scripts/packages_root.conf [new file with mode: 0644]
setup_scripts/start_root.sh

diff --git a/setup_scripts/packages_root.conf b/setup_scripts/packages_root.conf
new file mode 100644 (file)
index 0000000..766e60b
--- /dev/null
@@ -0,0 +1,11 @@
+# Packages installed by start_root.sh via apt-get.
+# One package per line; blank lines and lines starting with "#" are ignored.
+ack
+man-db
+ntpsec-ntpdate
+sudo
+sway
+tlp
+vim-gtk3
+wmenu
+xwayland
index 94e9ca33f2812615e196cff64cd8cd4b165a35b2..4bed8db128f725c707cd16d847c7617f032d720c 100755 (executable)
@@ -8,9 +8,9 @@ PATH_TLP_THRESH_CONF=/etc/tlp.conf.d/60-thresholds.conf
 PATH_UDEV_RULES=/etc/udev/rules.d
 
 # constants we might want to change at some point
+FNAME_PACKAGES=packages_root.conf
 FNAME_UDEV_RULES_BACKLIGHT=90-backlight.rules
 LOCALE=C.UTF-8
-TO_INSTALL="ack man-db ntpsec-ntpdate sudo sway tlp vim-gtk3 wmenu xwayland"
 USERNAME=plom
 PRINTK_LEVELS="4 4 1 7"
 TLP_THRESH_START=40
@@ -19,6 +19,16 @@ TLP_THRESH_STOP=80
 # constants derived from changeables
 PATH_TO_COPY="${PATH_REPO}/to_copy"
 
+# Assumes FNAME_PACKAGES ends with a newline, has no blank lines, and its
+# package-name lines contain no whitespace besides that newline.
+TO_INSTALL=
+while read -r LINE; do
+    case "${LINE}" in
+        '#'*) continue ;;
+    esac
+    TO_INSTALL="${TO_INSTALL} ${LINE}"
+done < "${FNAME_PACKAGES}"
+
 msg 'Ensuring packages: %s' "${TO_INSTALL}"
 apt-get -y update
 apt-get -y install ${TO_INSTALL}