aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--blog/posts/guide_sorcery_git/index.md183
-rw-r--r--blog/posts/guide_sorcery_git/index.php1
-rw-r--r--footer.php2
-rw-r--r--header.php5
-rw-r--r--me/index.php4
-rw-r--r--style.css15
-rw-r--r--uses/cumulonimbus/index.php5
7 files changed, 209 insertions, 6 deletions
diff --git a/blog/posts/guide_sorcery_git/index.md b/blog/posts/guide_sorcery_git/index.md
new file mode 100644
index 0000000..4a46ca9
--- /dev/null
+++ b/blog/posts/guide_sorcery_git/index.md
@@ -0,0 +1,183 @@
+Recently, someone retooted [this blog post](https://char.lt/blog/2026/09/sorcery-repo-viewer/) onto my Bluesky feed. I found it compelling; the scrapers haven't become a problem for me yet, but I also don't use 99% of the features my Forgejo instance provides, and I thought the program the article was about seemed cool. Besides, my Forgejo instance is running on my old domain, so I'll be needing to migrate all my repos at some point in the next two years anyway, so I might as well have some fun with it and switch hosting solutions while I'm at it.
+
+Inconveniently for me, however, [Sorcery](https://git.t4t.associates/char/sorcery/) is certified Oomfware™ and doesn't have such luxuries as a pre-compiled binary to download or a professional install guide, so I guess if I want this sucker on my server I'm figuring that shit out myself. It's also designed for use with Nginx and not my current reverse proxy, Caddy, so I'll have to decipher the provided nginx config and port it over. I figured I may as well write all that down so you don't have to figure it out yourself.
+
+# Git server
+
+Sorcery is just a read-only frontend for your git repos, so we'll have to set up a git server to use it with. I'll just be setting up a basic ssh git server as described in the [official Git docs](https://git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server), but I'll copy the instructions over here for your convenience.
+
+First, add a user on your server for the git server and switch to it:
+
+```
+adduser git
+su git
+cd
+```
+
+If you have ssh pubkey authentication set up (which you should) now's the time to enable it for the git user as well. I just did this by copying the contents of my `.ssh/authorized_keys` file into the git user's one at `/home/git/.ssh/authorized_keys`.
+
+```
+mkdir .ssh && chmod 700 .ssh
+touch .ssh/authorized_keys && chmod 600 .ssh/authorized_keys
+exit
+nano ~/.ssh/authorized_keys
+<copy the contents>
+su git
+nano ~/.ssh/authorized_keys
+<paste, save and exit>
+```
+
+This is actually what I did.
+
+Test to make sure ssh login works, and if it does, the git server is now technically set up. You can create repositories anywhere on the server that the `git` user has read/write permissions by creating a directory for the repo (convention dictates that you call it `repoName.git` but you don't have to) and initializing a bare repository in there:
+
+```
+mkdir reponame.git
+cd reponame.git
+git init --bare
+```
+
+Now you should be able to add it as a remote with `git remote add origin git@your.domain:/absolute/path/to/repoName.git` on your machine, or if you're lazy like me and just put your repositories in a folder in the git user's home directory, with `git remote add origin git@your.domain:relativePathTo/repoName.git`.
+
+Sorcery expects a folder structure like this for your repositories:
+
+```
+reposFolder
+├─userFolder
+│ ├─repoName.git
+│ └─repoName2.git
+└─userFolder
+```
+
+Now on to the interesting part.
+
+# Installing the fucker from source
+
+Sorcery doesn't have a precompiled binary to use that I could find, so it has to be built from source. Due to the developer's choices, this will require the use of Nix. I'm installing and configuring it through the distro package manager on Ubuntu Server, so this part might be a little different for you if you're using something else.
+
+First, naturally, Nix needs to be installed and the source code cloned:
+
+```
+apt install -y nix
+git clone https://git.t4t.associates/char/sorcery
+cd sorcery
+```
+
+If we try to `nix build` now, Nix is gonna give us some errors, so let's fix those. First, it'll complain about a couple of "experimental features" not being enabled. Enable the relevant ones by appending the following to `/etc/nix/nix.conf`:
+
+```
+experimental-features = nix-command flakes
+```
+
+If you're in my situation, that file should look like this after:
+
+<p class="codetitle">/etc/nix/nix.conf</p>
+
+```
+# see https://nixos.org/manual/nix/stable/command-ref/conf-file
+
+sandbox = true
+experimental-features = nix-command flakes
+```
+
+Now it's probably gonna complain that you've been denied permission to get the status of some kind of daemon-socket. You can gain permission by adding yourself to the `nix-users` group, like so:
+
+```
+sudo usermod -a -G nix-users yourusername
+```
+
+Make sure to log out and back in after you do that.
+
+Okay, *now* we can run `nix build` in the git repo to get our binary:
+
+```
+nix build
+```
+
+It'll show up inside the cloned repo at `result/bin/sorceryd`. Now move it somewhere that's not that &mdash; the Sorcery README suggests moving it to `/usr/local/bin/` "or whatever". Installing it there will make some pre-provided things like the systemd unit work with fewer changes, so I recommend you do that.
+
+```
+mv result/bin/sorceryd /usr/local/bin/
+```
+
+If you put it somewhere else, replace mentions of `/usr/local/bin/` accordingly.
+
+# Reverse proxy configuration
+
+The dev provides an nginx config for Sorcery through a script included in the repo that generates one. It's pretty elaborate, so I'm gonna have to run the script and reverse engineer its output to make a Caddy config. If you're using Nginx, I'm guessing this next part will be relevant to you. If you're using Caddy, skip ahead to where I provide the working Caddy config I used.
+
+## Extracting the Nginx config
+
+The script in question is a Typescript file, and the dev recommends using Deno, so we're gonna have to install that first. Annoyingly, Deno doesn't publish to most distro package managers, so that'll look about like this:
+
+```
+curl -fsSL https://deno.land/install.sh | sh
+```
+
+Yucky, but fortunately after that it just works, assuming you told it to add itself to the PATH when it asked. Now run the script:
+
+```
+deno run sorcery.ngx.ts > sorcery.conf
+```
+
+If you're using Nginx, edit the newly generated `sorcery.conf` accordingly and do whatever it is you do with it.
+
+## Caddy config
+
+Wow, that was tough. Thanks to my hard work, you may now simply copy this into your Caddyfile and you're golden:
+
+```
+
+```
+
+# systemd configuration
+
+Sorcery's README provides a systemd unit and the environment file it expects. We'll put the environment file in place first &mdash; copy this to `/etc/sorcery/env` and edit accordingly:
+
+<p class="codetitle">/etc/sorcery/env</p>
+
+```
+SORCERY_REPOSITORIES=/absolute/path/to/reposFolder
+SORCERY_CACHE=/var/cache/sorcery
+SORCERY_SOCKET=/run/sorcery/sock
+SORCERY_INSTANCE_NAME=your.domain
+SORCERY_CLONE_URL_BASE=https://your.domain
+SORCERY_CONTROL_SOCKET=/run/sorcery/control
+```
+
+Now paste the following systemd unit to `/etc/systemd/system/sorceryd.service`:
+
+<p class="codetitle">/etc/systemd/system/sorceryd.service</p>
+
+```
+[Unit]
+Description=Sorcery Git forge
+After=network.target
+
+[Service]
+Type=simple
+User=git
+Group=git
+RuntimeDirectory=sorcery
+CacheDirectory=sorcery
+ConfigurationDirectory=sorcery
+EnvironmentFile=/etc/sorcery/env
+ExecStart=/usr/local/bin/sorceryd
+Restart=on-failure
+RestartSec=2
+UMask=0027
+NoNewPrivileges=true
+PrivateTmp=true
+ProtectSystem=strict
+ProtectHome=read-only
+
+[Install]
+WantedBy=multi-user.target
+```
+
+Mercifully, if you've followed this guide so far, you shouldn't need to change anything in there. Now you can start 'er up:
+
+```
+sudo systemctl daemon-reload
+sudo systemctl enable --now sorceryd.service
+``` \ No newline at end of file
diff --git a/blog/posts/guide_sorcery_git/index.php b/blog/posts/guide_sorcery_git/index.php
new file mode 100644
index 0000000..952e6d9
--- /dev/null
+++ b/blog/posts/guide_sorcery_git/index.php
@@ -0,0 +1 @@
+<?php include($_SERVER['DOCUMENT_ROOT'] . '/blog/post.php'); \ No newline at end of file
diff --git a/footer.php b/footer.php
index 366fe2d..cc371ad 100644
--- a/footer.php
+++ b/footer.php
@@ -41,7 +41,7 @@
'Bug Women'
);
echo("&copy;".date("Y")." ".$copyrice[array_rand($copyrice)]);
- ?> | <a href="https://git.isopod.cool/root/isopod.cool">source</a></p>
+ ?> | <a href="https://git.bugwo.men/bugwomen.git/">source</a></p>
<div class="buttons">
<img src="https://bugwo.men/etc/buttons/isopodhours.png" alt="isopod hours">
<a target="_blank" href="https://deeptwisty.com/"><img src="https://bugwo.men/etc/buttons/deeptwisty_button.png" alt="deep twisty"></a>
diff --git a/header.php b/header.php
index 6e0cf8e..7890885 100644
--- a/header.php
+++ b/header.php
@@ -143,7 +143,7 @@ if(!preg_match('/(headless.*)/i', $_SERVER['HTTP_USER_AGENT'])) {
'Better than Version 3.2 Gen 2x2!',
'Partially responsive!',
'#1 anti-boyfriend advocate',
- '4 bugs in a trench coat!',
+ '6 bugs in a trench coat!',
'Now 86% less cool!',
'Bug women!',
'Cost streamlined!',
@@ -191,6 +191,9 @@ function echolink($url, $name) {
?>
<header>
+ <script>
+ document.querySelector("#footercaption").outerHTML = "pebis";
+ </script>
<input type="checkbox" name="nav-checkbox-hack" id="nav-checkbox-hack" style="display: none;">
<div class="headerbar">
<h1><?php echo($host); ?><sup>v4</sup></h1>
diff --git a/me/index.php b/me/index.php
index 7e06d93..dfe82a3 100644
--- a/me/index.php
+++ b/me/index.php
@@ -68,8 +68,8 @@
<dd><a rel="me" href="https://deeptwisty.itch.io/">deeptwisty</a></dd>
<dt>Ko-fi</dt>
<dd><a rel="me" href="https://ko-fi.com/deeptwisty">deeptwisty</a></dd>
- <dt>Forgejo</dt>
- <dd><a rel="me" href="https://git.isopod.cool/root/">git.isopod.cool/root</a></dd>
+ <dt>Personal Git</dt>
+ <dd><a rel="me" href="https://git.bugwo.men/">git.bugwo.men</a></dd>
<dt>Steam</dt>
<dd>ask</dd>
</dl>
diff --git a/style.css b/style.css
index 5644bd0..e9741c6 100644
--- a/style.css
+++ b/style.css
@@ -12,6 +12,21 @@
--message-yellow: light-dark(#d3b200, yellow);
--message-blue: light-dark(#005fbb, dodgerblue);
+
+ --red-text: light-dark(#780a0a, #ff5136);
+ --yellow-text: light-dark(#76640a, #ffdf41);
+ --green-text: light-dark(#2d780a, #3cff4c);
+ --cyan-text: light-dark(#0a7660, #51ffdc);
+ --blue-text: light-dark(#0a3878, #378aff);
+ --purple-text: light-dark(#670a75, #e74aff);
+
+ --red-bg: light-dark(#ff5136, #780a0a);
+ --yellow-bg: light-dark(#ffdf41, #76640a);
+ --green-bg: light-dark(#3cff4c, #2d780a);
+ --cyan-bg: light-dark(#51ffdc, #0a7660);
+ --blue-bg: light-dark(#378aff, #0a3878);
+ --purple-bg: light-dark(#e74aff, #670a75);
+
--linkcolor: var(--accent1);
--linkhover: var(--accent2);
diff --git a/uses/cumulonimbus/index.php b/uses/cumulonimbus/index.php
index 3899b7e..105f0b6 100644
--- a/uses/cumulonimbus/index.php
+++ b/uses/cumulonimbus/index.php
@@ -53,8 +53,9 @@
</section>
<section>
- <h4><a href="https://forgejo.org/">Forgejo</a></h4>
- <p>My needs aren't really comprehensive enough to speak on the quality of Forgejo as a git forge beyond that it seems pretty good and does everything I need. I do like how easy it is to update.</p>
+ <h4><a href="https://git.zx2c4.com/cgit/about/">cgit</a></h4>
+ <p>I use this in conjunction with a basic-ass <a href="https://git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server">ssh git</a> server for my personal projects. It does what little I need out of it fine. My <a href="https://git.bugwo.men/">instance</a> is <a href="https://git.bugwo.men/cgit-configs.git/">customized</a> with an actually good stylesheet and a couple other fun things, because cgit makes that pretty easy to do.</p>
+ <p>I used to use Forgejo, which I like and would still be using if I was sharing it with other people, but I switched because I wasn't using literally any of its many features and I didn't want to worry about LLM scrapers finding it and bringing both it and my server to their knees at an arbitrary point in the future.</p>
</section>
<section>