home · contact · privacy
Add catgirl setup.
authorChristian Heller <c.heller@plomlompom.de>
Thu, 10 Apr 2025 05:57:49 +0000 (07:57 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Thu, 10 Apr 2025 05:57:49 +0000 (07:57 +0200)
bookworm/aptmark/catgirl [new file with mode: 0644]
bookworm/aptmark/server
bookworm/etc/catgirl/systemd/system/catgirl.service [new file with mode: 0644]
bookworm/home/catgirl/.config/catgirl/libera [new file with mode: 0644]
bookworm/preseed.cfg
bookworm/scripts/setup_catgirl.sh [new file with mode: 0755]
bookworm/scripts/setup_server.sh [deleted file]

diff --git a/bookworm/aptmark/catgirl b/bookworm/aptmark/catgirl
new file mode 100644 (file)
index 0000000..ddab378
--- /dev/null
@@ -0,0 +1,4 @@
+# IRC
+tmux
+catgirl
+#
index ca3474f0100de7c9b7473d487dc9dd7e3d2b7147..cefa289f729f569bd1682533b4bea6d2c78861c9 100644 (file)
@@ -6,7 +6,4 @@ nftables
 borgbackup
 # for playing nicely with ssh sessions via the foot terminal
 foot-terminfo
-# IRC
-tmux
-catgirl
 #
diff --git a/bookworm/etc/catgirl/systemd/system/catgirl.service b/bookworm/etc/catgirl/systemd/system/catgirl.service
new file mode 100644 (file)
index 0000000..38d9fd1
--- /dev/null
@@ -0,0 +1,15 @@
+[Unit]
+Description=catgirl in tmux Session
+After=network.target
+
+[Service]
+Type=forking
+User=plom
+ExecStart=/usr/bin/tmux new-session -d -s catgirl_tmux /usr/bin/catgirl libera
+ExecStop=/usr/bin/tmux kill-session -t catgirl_tmux
+Restart=always
+RestartSec=10
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/bookworm/home/catgirl/.config/catgirl/libera b/bookworm/home/catgirl/.config/catgirl/libera
new file mode 100644 (file)
index 0000000..5d04ff2
--- /dev/null
@@ -0,0 +1,3 @@
+host = irc.libera.chat
+join = #plomtest
+sasl-plain = plomlompom:REPLACE_WITH_SASL_PASSWORD
index 7553d7ccb70de4d72724c8eed07a61630ff9e794..06d576681a26c975b0bb5e173a31708d3220086f 100644 (file)
@@ -32,7 +32,7 @@ d-i partman-auto-crypto/erase_disks boolean false
 
 d-i base-installer/kernel/image string linux-image-amd64
 d-i base-installer/initramfs-tools/driver-policy most
-d-i base-installer/install-recommends boolean false
+#d-i base-installer/install-recommends boolean false
 
 #d-i pkgsel/run_tasksel boolean false
 
diff --git a/bookworm/scripts/setup_catgirl.sh b/bookworm/scripts/setup_catgirl.sh
new file mode 100755 (executable)
index 0000000..4900947
--- /dev/null
@@ -0,0 +1,60 @@
+#!/bin/sh
+set -e
+cd $(dirname "$0")
+. lib/constants_repopaths # PATH_CONF
+. lib/constants_ssh  # PATH_REL_SSH, PATH_USER_SSH
+. lib/constants_user  # PATH_USER_HOME, USERNAME
+. lib/copy_dirtree
+. lib/determine_ip
+. lib/expect_n_args
+. lib/init_packages
+. lib/setup_users
+
+MIN_TAGS='all server catgirl'
+
+expect_n_args 3 3 'HOSTNAME, FQDN, SASL_PASSWORD' $@
+HOSTNAME="$1"
+FQDN="$2"
+SASL_PASSWORD="$2"
+
+PATH_REL_ETC=etc
+PATH_CONF_ETC="${PATH_CONF}/${PATH_REL_ETC}"
+PATH_ETC="/${PATH_REL_ETC}"
+PATH_HOSTS="${PATH_ETC}/hosts"
+PATH_BORG_HOME=/home/borg
+
+init_packages "${MIN_TAGS}"
+
+echo '\nSetting hostname and FQDN.'
+echo "${HOSTNAME}" > "${PATH_ETC}/hostname"
+hostname "${HOSTNAME}"
+echo '127.0.0.1 localhost.localdomain localhost' > "${PATH_HOSTS}"
+echo "$(determine_ip) ${FQDN} ${HOSTNAME}" >> "${PATH_HOSTS}"
+
+echo '\nAdapting /etc to our needs.'
+copy_dirtree "${PATH_CONF_ETC}" "${PATH_ETC}"${MIN_TAGS}
+
+echo '\nSetting Berlin localtime.'
+ln -sf /usr/share/zoneinfo/Europe/Berlin "${PATH_ETC}/localtime"
+ntpdate-debian
+
+setup_users "${MIN_TAGS}" ''
+
+echo '\nMoving SSH data from root to user.'
+mkdir -p "${PATH_USER_SSH}"
+mv "/root/${PATH_REL_SSH}/authorized_keys" "${PATH_USER_SSH}/"
+chown -R "${USERNAME}:${USERNAME}" "${PATH_USER_SSH}"
+
+echo '\nSetting up minimal borg user.'
+adduser --system --home "${PATH_BORG_HOME}" --shell /bin/sh borg
+cp -a "${PATH_USER_SSH}" "${PATH_BORG_HOME}/"
+chown -R borg:nogroup "${PATH_BORG_HOME}/${PATH_REL_SSH}"
+
+echo '\nEnabling the firewall.'
+systemctl enable nftables.service
+systemctl start nftables.service
+
+echo '\nSet up catgirl.'
+sed -i "s/REPLACE_WITH_SASL_PASSWORD/${SASL_PASSWORD}/g" "${PATH_USER_HOME}/.config/catgirl/libera"
+systemctl enable catgirl.service
+systemctl start catgirl.service
diff --git a/bookworm/scripts/setup_server.sh b/bookworm/scripts/setup_server.sh
deleted file mode 100755 (executable)
index 1c79edd..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/sh
-set -e
-cd $(dirname "$0")
-. lib/constants_repopaths # PATH_CONF
-. lib/constants_ssh  # PATH_REL_SSH, PATH_USER_SSH
-. lib/constants_user  # USERNAME
-. lib/copy_dirtree
-. lib/determine_ip
-. lib/expect_n_args
-. lib/init_packages
-. lib/setup_users
-
-MIN_TAGS='all server'
-
-expect_n_args 2 2 'HOSTNAME, FQDN' $@
-HOSTNAME="$1"
-FQDN="$2"
-
-PATH_REL_ETC=etc
-PATH_CONF_ETC="${PATH_CONF}/${PATH_REL_ETC}"
-PATH_ETC="/${PATH_REL_ETC}"
-PATH_HOSTS="${PATH_ETC}/hosts"
-PATH_BORG_HOME=/home/borg
-
-init_packages "${MIN_TAGS}"
-
-echo '\nSetting hostname and FQDN.'
-echo "${HOSTNAME}" > "${PATH_ETC}/hostname"
-hostname "${HOSTNAME}"
-echo '127.0.0.1 localhost.localdomain localhost' > "${PATH_HOSTS}"
-echo "$(determine_ip) ${FQDN} ${HOSTNAME}" >> "${PATH_HOSTS}"
-
-echo '\nAdapting /etc to our needs.'
-copy_dirtree "${PATH_CONF_ETC}" "${PATH_ETC}"${MIN_TAGS}
-
-echo '\nSetting Berlin localtime.'
-ln -sf /usr/share/zoneinfo/Europe/Berlin "${PATH_ETC}/localtime"
-ntpdate-debian
-
-setup_users "${MIN_TAGS}" ''
-
-echo '\nMoving SSH data from root to user.'
-mkdir -p "${PATH_USER_SSH}"
-mv "/root/${PATH_REL_SSH}/authorized_keys" "${PATH_USER_SSH}/"
-chown -R "${USERNAME}:${USERNAME}" "${PATH_USER_SSH}"
-
-echo '\nSetting up minimal borg user.'
-adduser --system --home "${PATH_BORG_HOME}" --shell /bin/sh borg
-cp -a "${PATH_USER_SSH}" "${PATH_BORG_HOME}/"
-chown -R borg:nogroup "${PATH_BORG_HOME}/${PATH_REL_SSH}"
-
-echo '\nEnabling the firewall.'
-systemctl enable nftables.service