Micron Document
git repos on thatit.be

I've been toiling with how the pieces should fit together for a while. It's somewhat come together only recently.

These are my needs:

• serve up a project page (preferably over gemini)
• allow anonymous http access
• allow authenticated users with r/w access

the ideal

I'll have project pages on gemini, git repos over https, and I'll use server side hooks and the web backend to do any server-side prep work that's needed.

From the hooks, I can update the refs when users with certificate access push files and I can generate an index from the project README file. This means anyone with shell access will be able to run commands by putting them in repository, but since it's group read/write that's no different than their current level of access.

It also means that projects will no longer have a 403-forbidden page if someone tries to navigate to the web front-end.

There is no concept of groups -- through there could be if directories were added, but I'm going to keep them flat for now unless users decide otherwise.

the practical

Hooks project created:

• allow stacking other hooks
• readme to html generation
• touch the export file (T383838git-daemon-export-ok)
• info/refs update (T383838git update-server-info)

The hooks project features a single T383838post-receive file that looks for and runs other hooks that exist. The hooks have to have any logic embedded in them to decide to run or not. For example, the README.md to index.html conversion one exits if there isn't a README.mu. But otherwise everything will run. And the mechanism for including the hooks is just a symlink from the hooks subdirectory of each project to the hooks project T383838post-receive. Making the symlink is a manual step, but after that everything is hooks.

All dependencies are handled by nix, I use a nix-shell shebang in the scripts so they can specify the packages they need and it all goes really smoothly.

what's left

The todo list:

• auto-publish to gemini
• add shared resources (at least for stylesheets)

I need to have a thing that puts the project into gemini space, but the server is all co-located, I just need to create a hook that puts things on the gemini side. When I do this, regular pushes of my notes will also trigger builds, so I'll probably be getting to this pretty soon.

what's hosted so far

And all of this came about because I wanted better sharing of my neovim config.



Tags: index

Tags
Navigation
Backlinks


created: 2026-01-28

(re)generated: 2026-07-17