From d1eaa71c8a05bb9febe4e34c27c3c65d2b442568 Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Thu, 9 May 2024 13:05:35 -0400 Subject: cmd/sapientwindex: clean up manual Signed-off-by: Xe Iaso --- cmd/sapientwindex/README.md | 19 ++++++++++--------- flake.nix | 11 +++++++++-- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/cmd/sapientwindex/README.md b/cmd/sapientwindex/README.md index dd6a3b7..3ea7dd1 100644 --- a/cmd/sapientwindex/README.md +++ b/cmd/sapientwindex/README.md @@ -1,11 +1,11 @@ # sapientwindex sapientwindex is a Reddit -> Discord bot. It will monitor a subreddit -(or group of subreddits) and then post any new posts to a given -channel by webhook. +(or group of subreddits) and then post any new posts it finds to a +given webhook. Avatars are automatically created using Stable Diffusion.
- If you know what "Kubernetes" means and you have your own cluster + If you know what a Kubernetes cluster is and you have one already If you have a Kubernetes cluster, create a generic secret called `sapientwindex` in the default namespace with the following fields: @@ -27,6 +27,12 @@ namespace is desired.
+## Hosted option + +For a nominal fee, I can host a copy of this bot for you on my +homelab. Please [contact me](sapientwindexsales@xeserv.us) to arrange +terms for this hosted option. + ## Prerequisites for self-hosting In order to host this yourself, you need the following things: @@ -40,6 +46,7 @@ In order to host this yourself, you need the following things: 1. Install [Docker Desktop](https://docs.docker.com/desktop/install/windows-install/) + to run the sapientwindex container. 1. Run the following command to start the sapientwindex service: ``` docker run --name sapientwindex -e DISCORD_WEBHOOK_URL= -e REDDIT_USERNAME= -e SUBREDDITS= -dit ghcr.io/xe/x/sapientwindex:latest @@ -73,12 +80,6 @@ To update the bot, run these commands: Updates to the bot will be done very infrequently. -## Hosted option - -For a nominal fee, I can host a copy of this bot for you on my -homelab. Please [contact me](sapientwindexsales@xeserv.us) to arrange -terms for this hosted option. - ## Support Support is done by [GitHub issues](https://github.com/Xe/x/issues) on diff --git a/flake.nix b/flake.nix index 9cef608..8757443 100644 --- a/flake.nix +++ b/flake.nix @@ -180,6 +180,14 @@ nativeBuildInputs = with pkgs; [ pkg-config ]; subPackages = [ "cmd/robocadey2" ]; }; + + sapientwindex = pkgs.buildGo122Module { + pname = "sapientwindex"; + inherit version vendorHash; + src = ./.; + nativeBuildInputs = with pkgs; [ pkg-config ]; + subPackages = [ "cmd/sapientwindex" ]; + }; copyFile = { pname, path ? pname }: pkgs.stdenv.mkDerivation { @@ -222,7 +230,7 @@ path = "make-mastodon-app"; }; - inherit xedn xedn-static robocadey2 mimi tourian; + inherit xedn xedn-static robocadey2 mimi tourian sapientwindex; aegis = copyFile { pname = "aegis"; }; cadeybot = copyFile { pname = "cadeybot"; }; @@ -232,7 +240,6 @@ prefix = copyFile { pname = "prefix"; }; quickserv = copyFile { pname = "quickserv"; }; sanguisuga = copyFile { pname = "sanguisuga"; }; - sapientwindex = copyFile { pname = "sapientwindex"; }; todayinmarch2020 = copyFile { pname = "todayinmarch2020"; }; uploud = copyFile { pname = "uploud"; }; vest-pit-near = copyFile { pname = "vest-pit-near"; }; -- cgit v1.2.3