From 068c392d15141fb95bdf0b398146a187fd42920f Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Thu, 10 Apr 2025 07:57:49 +0200 Subject: [PATCH] Add catgirl setup. --- bookworm/aptmark/catgirl | 4 ++++ bookworm/aptmark/server | 3 --- .../etc/catgirl/systemd/system/catgirl.service | 15 +++++++++++++++ bookworm/home/catgirl/.config/catgirl/libera | 3 +++ bookworm/preseed.cfg | 2 +- .../scripts/{setup_server.sh => setup_catgirl.sh} | 13 ++++++++++--- 6 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 bookworm/aptmark/catgirl create mode 100644 bookworm/etc/catgirl/systemd/system/catgirl.service create mode 100644 bookworm/home/catgirl/.config/catgirl/libera rename bookworm/scripts/{setup_server.sh => setup_catgirl.sh} (78%) diff --git a/bookworm/aptmark/catgirl b/bookworm/aptmark/catgirl new file mode 100644 index 0000000..ddab378 --- /dev/null +++ b/bookworm/aptmark/catgirl @@ -0,0 +1,4 @@ +# IRC +tmux +catgirl +# diff --git a/bookworm/aptmark/server b/bookworm/aptmark/server index ca3474f..cefa289 100644 --- a/bookworm/aptmark/server +++ b/bookworm/aptmark/server @@ -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 index 0000000..38d9fd1 --- /dev/null +++ b/bookworm/etc/catgirl/systemd/system/catgirl.service @@ -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 index 0000000..5d04ff2 --- /dev/null +++ b/bookworm/home/catgirl/.config/catgirl/libera @@ -0,0 +1,3 @@ +host = irc.libera.chat +join = #plomtest +sasl-plain = plomlompom:REPLACE_WITH_SASL_PASSWORD diff --git a/bookworm/preseed.cfg b/bookworm/preseed.cfg index 7553d7c..06d5766 100644 --- a/bookworm/preseed.cfg +++ b/bookworm/preseed.cfg @@ -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_server.sh b/bookworm/scripts/setup_catgirl.sh similarity index 78% rename from bookworm/scripts/setup_server.sh rename to bookworm/scripts/setup_catgirl.sh index 1c79edd..4900947 100755 --- a/bookworm/scripts/setup_server.sh +++ b/bookworm/scripts/setup_catgirl.sh @@ -3,18 +3,19 @@ set -e cd $(dirname "$0") . lib/constants_repopaths # PATH_CONF . lib/constants_ssh # PATH_REL_SSH, PATH_USER_SSH -. lib/constants_user # USERNAME +. 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' +MIN_TAGS='all server catgirl' -expect_n_args 2 2 'HOSTNAME, FQDN' $@ +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}" @@ -51,3 +52,9 @@ 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 -- 2.30.2