From 649e6db8259fe5d5cc0b712c974fa16f6629206f Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 1 Aug 2025 20:29:54 +0200 Subject: [PATCH] Run senpai through nix-portable --- scripts/p7s/senpai.py | 6 ++++++ scripts/pyproject.toml | 1 + workstation/build_workstation | 1 - workstation/modern_irc.md | 4 ++-- 4 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 scripts/p7s/senpai.py diff --git a/scripts/p7s/senpai.py b/scripts/p7s/senpai.py new file mode 100644 index 0000000..6062987 --- /dev/null +++ b/scripts/p7s/senpai.py @@ -0,0 +1,6 @@ +#!/usr/bin/python3 +import os, shutil, subprocess, sys + +def main(): + os.environ["NP_RUNTIME"] = "bwrap" + sys.exit(subprocess.run([shutil.which("nix-portable"), "nix", "run", "nixpkgs#senpai"]).returncode) diff --git a/scripts/pyproject.toml b/scripts/pyproject.toml index 69b6ab2..b7b5ecf 100644 --- a/scripts/pyproject.toml +++ b/scripts/pyproject.toml @@ -28,3 +28,4 @@ setup_emacs = 'p7s.emacs:setup_emacs' setup_ubpkg = 'p7s.ubpkg:setup_ubpkg' setup_paperwm = 'p7s.paperwm:setup_paperwm' setup_x12 = 'p7s.x12:setup_x12' +senpai = 'p7s.senpai:main' diff --git a/workstation/build_workstation b/workstation/build_workstation index cb58db3..fd3d82f 100755 --- a/workstation/build_workstation +++ b/workstation/build_workstation @@ -29,7 +29,6 @@ set -ue --package qemu-img \ --package cdrtools \ --package mailutils \ - --package senpai \ --aur-package telegram-tdlib-purple-minimal-git \ --aur-package bitlbee-libpurple \ workstation diff --git a/workstation/modern_irc.md b/workstation/modern_irc.md index 5729d5d..1599d3a 100644 --- a/workstation/modern_irc.md +++ b/workstation/modern_irc.md @@ -31,10 +31,10 @@ With this setup, I can: # Set up -My [workstation container image](build_workstation) includes Bitlbee, and the Telegram/Bitlbee adapter. +My [workstation container image](build_workstation) includes Soju, Bitlbee, and the Telegram/Bitlbee adapter. I have Python scripts that configure [soju](../scripts/p7s/soju.py) and [Bitlbee](../scripts/p7s/bitlbee.py) as persistent systemd services running as containers. -The container image also includes Senpai, which I run using [distrobox](https://distrobox.it/). +I use [Senpai](https://git.sr.ht/~delthas/senpai/) through [nix-portable](https://github.com/DavHau/nix-portable). I install Goguma on my phone using [F-Droid](https://f-droid.org/). -- 2.47.3