aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2024-05-09 13:05:35 -0400
committerXe Iaso <me@xeiaso.net>2024-05-09 13:05:35 -0400
commitd1eaa71c8a05bb9febe4e34c27c3c65d2b442568 (patch)
tree895e53958f6b71815568bfbee25185024c436231
parent3a943a2986151aefc61923cef5b2c84edb266279 (diff)
downloadx-d1eaa71c8a05bb9febe4e34c27c3c65d2b442568.tar.xz
x-d1eaa71c8a05bb9febe4e34c27c3c65d2b442568.zip
cmd/sapientwindex: clean up manual
Signed-off-by: Xe Iaso <me@xeiaso.net>
-rw-r--r--cmd/sapientwindex/README.md19
-rw-r--r--flake.nix11
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.
<details>
- <summary>If you know what "Kubernetes" means and you have your own cluster</summary>
+ <summary>If you know what a Kubernetes cluster is and you have one already</summary>
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.
</details>
+## 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=<paste webhook here> -e REDDIT_USERNAME=<your reddit username> -e SUBREDDITS=<list,of,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"; };