From d14b59dcbec01f1a65714c36448e82ea8af63dd6 Mon Sep 17 00:00:00 2001 From: Ada Isopods Date: Fri, 23 Oct 2026 12:10:50 -0600 Subject: rearranging some stuff in preparation for a new deployment workflow --- blog/posts/building_a_cooler_body_2/index.md | 3 - blog/posts/building_a_cooler_body_2/index.php | 1 - blog/posts/guide_sorcery_git/index.md | 183 -------------------------- blog/posts/guide_sorcery_git/index.php | 1 - blog/posts/invaluable_contributions/bg.png | Bin 0 -> 367568 bytes blog/posts/invaluable_contributions/index.md | 37 ++++++ blog/posts/invaluable_contributions/index.php | 1 + 7 files changed, 38 insertions(+), 188 deletions(-) delete mode 100644 blog/posts/building_a_cooler_body_2/index.md delete mode 100644 blog/posts/building_a_cooler_body_2/index.php delete mode 100644 blog/posts/guide_sorcery_git/index.md delete mode 100644 blog/posts/guide_sorcery_git/index.php create mode 100644 blog/posts/invaluable_contributions/bg.png create mode 100644 blog/posts/invaluable_contributions/index.md create mode 100644 blog/posts/invaluable_contributions/index.php (limited to 'blog') diff --git a/blog/posts/building_a_cooler_body_2/index.md b/blog/posts/building_a_cooler_body_2/index.md deleted file mode 100644 index 8f6fe6b..0000000 --- a/blog/posts/building_a_cooler_body_2/index.md +++ /dev/null @@ -1,3 +0,0 @@ -It has certainly been a very interesting year for my endocrine system. - -As of publishing, I started estrogen exactly one year ago, and the [blog post](../building_a_cooler_body/) about my Journey™ towards this also went up exactly one year ago. \ No newline at end of file diff --git a/blog/posts/building_a_cooler_body_2/index.php b/blog/posts/building_a_cooler_body_2/index.php deleted file mode 100644 index 952e6d9..0000000 --- a/blog/posts/building_a_cooler_body_2/index.php +++ /dev/null @@ -1 +0,0 @@ - -su git -nano ~/.ssh/authorized_keys - -``` - -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: - -

/etc/nix/nix.conf

- -``` -# 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 — 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 — copy this to `/etc/sorcery/env` and edit accordingly: - -

/etc/sorcery/env

- -``` -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`: - -

/etc/systemd/system/sorceryd.service

- -``` -[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 deleted file mode 100644 index 952e6d9..0000000 --- a/blog/posts/guide_sorcery_git/index.php +++ /dev/null @@ -1 +0,0 @@ -This article was written with the assistance of ChatGPT.

\ No newline at end of file diff --git a/blog/posts/invaluable_contributions/index.php b/blog/posts/invaluable_contributions/index.php new file mode 100644 index 0000000..952e6d9 --- /dev/null +++ b/blog/posts/invaluable_contributions/index.php @@ -0,0 +1 @@ +