From 382f7da7157b5b5f845771965fd547c2aeafba93 Mon Sep 17 00:00:00 2001 From: alex Date: Sat, 28 Oct 2023 09:40:25 +0000 Subject: Add bitlbee setup --- scripts/p7s/bitlbee.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 scripts/p7s/bitlbee.py (limited to 'scripts/p7s') diff --git a/scripts/p7s/bitlbee.py b/scripts/p7s/bitlbee.py new file mode 100644 index 00000000..4f0acbd4 --- /dev/null +++ b/scripts/p7s/bitlbee.py @@ -0,0 +1,31 @@ +import pathlib +import textwrap + + +def setup_bitlbee(): + home = pathlib.Path.home() + config = home / ".config" / "containers" / "systemd" + config.mkdir(parents=True, exist_ok=True) + (config / "bitlbee.container").write_text(textwrap.dedent(""" + [Unit] + Description=IM-IRC bridge + + [Container] + Image=quay.io/alexpdp7/workstation:latest + Volume=/home/alex/.local/lib/bitlbee:/var/lib/bitlbee/ + # running this on an LXC container, which borks SecurityLabelDisable + #SecurityLabelDisable=true + PublishPort=6668:6667 + + Exec=bitlbee -Fnv + + [Service] + # Extend Timeout to allow time to pull the image + TimeoutStartSec=900 + + [Install] + # Start by default on boot + WantedBy=multi-user.target default.target + """).lstrip()) + + (home / ".local" / "lib" / "bitlbee").mkdir(parents=True, exist_ok=True) -- cgit v1.2.3