Skip to content

Install guides for Nix, Ubuntu, and Windows + release workflow for static binaries#9

Merged
sdelcore merged 5 commits into
mainfrom
add-install-docs-and-releases
Jul 14, 2026
Merged

Install guides for Nix, Ubuntu, and Windows + release workflow for static binaries#9
sdelcore merged 5 commits into
mainfrom
add-install-docs-and-releases

Conversation

@sdelcore

@sdelcore sdelcore commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Why

The README only had a NixOS dev-shell quickstart — no way for someone on Ubuntu, Windows, or any non-Nix machine to install the platform, and the flake's package + NixOS module were undocumented despite already working.

What

  • README ## Install section, split by role — hosting the server vs using the CLI:
    • Hosting (Linux only)
      • Nix: nix profile install github:sdelcore/shared, plus a copy-paste services.shared NixOS module example (the module already existed in the flake, just wasn't documented).
      • Ubuntu / other Linux: release tarball or CGO_ENABLED=0 go install (with a note that Go 1.24+ is newer than Ubuntu 24.04's apt package), plus a systemd unit mirroring the NixOS module (DynamicUser, StateDirectory, /var/lib/shared).
    • CLI (any machine)
      • Linux/macOS: the release tarball or go install .../cmd/shared@latest.
      • Windows: CLI only — the server intentionally does not ship for Windows. Release zip contains just shared.exe; point it at the server with SHARED_SERVER.
    • Also documents the homepage's × delete button alongside the sites list.
  • skills/install-shared-cli/: an agent skill (Claude Code or any SKILL.md-compatible agent) that installs the CLI on whatever OS it's running on — Nix → Go → release binary, then sets SHARED_SERVER and smoke-tests with shared list. README shows the one-liner to copy it into ~/.claude/skills/.
  • .github/workflows/release.yml: on v* tags, cross-compiles static binaries (CGO_ENABLED=0 -trimpath -ldflags "-s -w"): linux amd64/arm64 tarballs with sharedd + shared, windows amd64/arm64 zips with shared.exe only. Publishes with gh release create --generate-notes.
  • shared open now picks the opener per OS (rundll32 on Windows, open on macOS, xdg-open elsewhere) instead of hardcoding xdg-open — the only Windows-incompatible code in the repo.

Verified

  • go build, go vet, go test ./... pass; cross-compiles clean for linux, windows, and darwin (pure Go, no cgo).
  • shared init scaffolds correctly and skips existing files on re-run.
  • Ran the workflow's exact build/package loops locally: linux tarballs contain statically linked, stripped binaries (file confirms — no glibc coupling, unlike the nix-built binary); the windows zip contains a single valid PE32+ shared.exe.
  • Workflow passes actionlint.
  • .github/workflows/ci.yml: on pushes to main and PRs — go vet, go test, cross-compile check for linux/windows/darwin, and nix build (catches stale vendorHash when deps change). Both jobs green on this PR.

@sdelcore sdelcore changed the title Install guides for Nix and Ubuntu + release workflow for static binaries Install guides for Nix, Ubuntu, and Windows + release workflow for static binaries Jul 14, 2026
@sdelcore
sdelcore merged commit e5c6275 into main Jul 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant