- Go 49.6%
- HTML 42.5%
- Nix 4.7%
- Python 2.6%
- JavaScript 0.6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo/workflows | ||
| assets/art | ||
| cmd | ||
| content | ||
| docs/superpowers | ||
| hugo-export | ||
| internal | ||
| mock | ||
| nix | ||
| .env.example | ||
| .envrc | ||
| .gitignore | ||
| .golangci.yml | ||
| default.nix | ||
| flake.lock | ||
| flake.nix | ||
| go.mod | ||
| go.sum | ||
| gomod2nix.toml | ||
| README.md | ||
| renovate.json | ||
| shell.nix | ||
| Taskfile.yml | ||
ssh.haseebmajid.dev
A terminal-native blog and CV for haseebmajid.dev, readable over SSH.
Content is a build-time snapshot: Hugo resolves publication, shortcodes, and URLs from a pinned checkout of the blog, and an offline Go tool normalizes that export into terminal-oriented Markdown. The server reads only the prepared snapshot — no Hugo, blog checkout, or network access at runtime.
Stack
Go, Wish v2, Bubble Tea v2, Lip Gloss v2, Goldmark, Hugo, gomod2nix, NixOS.
Layout
cmd/server # SSH server (Wish + Bubble Tea)
cmd/content # offline content preparation (Hugo export + normalize)
internal/server # Wish setup, route parsing
internal/tui # session-local Bubble Tea models
internal/content # catalogue, search, HTML normalization
internal/markdown # Goldmark terminal rendering + sanitization
content/ # repository-owned home.md and cv.md
hugo-export/ # export-only Hugo overlay (JSON output per post)
Usage
Prepare content
go run ./cmd/content \
-source ../blog \
-output ./build/content \
-hugo hugo \
-clock 2026-11-15T00:00:00Z
Run
ssh-keygen -t ed25519 -N '' -f ./tmp/ssh_host_ed25519_key
go run ./cmd/server \
-host 127.0.0.1 -port 23234 \
-host-key ./tmp/ssh_host_ed25519_key \
-content ./build/content
Then connect:
ssh -t -p 23234 localhost # home
ssh -t -p 23234 localhost /cv # CV
ssh -t -p 23234 localhost /blog # catalogue + search
ssh -t -p 23234 localhost /blog/<id> # article
Nix
nix build .#default
nix develop # Go + Hugo + gomod2nix
The package installs the server under bin/ssh-site-server and prepared content
under share/ssh-site/. A reusable NixOS module is exposed as
nixosModules.default (services.ssh-site).
Reproducibility note: the Hugo export resolves the blog's
reveal-hugotheme module throughgo, which currently needs network access at build time. For fully offline builds, vendor the Hugo module (hugo mod vendor) or pre-fetch it into the Go module cache.
Tests
go test ./...