From 0da07fd42181725eccd56409b7cf0dd2fa81a6bd Mon Sep 17 00:00:00 2001 From: JP Hastings-Spital Date: Sun, 31 May 2026 10:52:30 +0200 Subject: [PATCH] Surface README and metadata on the atcr.io image page atcr.io reads OCI annotations / config labels on push: it fetches io.atcr.readme (and links source/version/title). Bake labels into the dockerTools image so the repo's README.md renders on the image page automatically, no UI editing. --- flake.nix | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 08b7bda..16b6403 100644 --- a/flake.nix +++ b/flake.nix @@ -13,11 +13,16 @@ let pkgs = import nixpkgs { inherit system; }; + # Cosmetic version, derived from the commit. The published image is + # tagged from the git tag (TANGLED_REF_NAME) in CI, not this. + version = self.shortRev or self.dirtyShortRev or "dev"; + + # Where the repo lives, so atcr.io can show its README and source link. + repoURL = "https://tangled.org/byjp.me/deepsky"; + deepsky = pkgs.buildGoModule { pname = "deepsky"; - # Cosmetic derivation label, derived from the commit. The published - # image is tagged from the git tag (TANGLED_REF_NAME) in CI, not this. - version = self.shortRev or self.dirtyShortRev or "dev"; + inherit version; src = ./.; # Hash of the fetched Go module sources. Regenerate after changing @@ -50,6 +55,16 @@ "1965/tcp" = { }; }; Env = [ "SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt" ]; + # atcr.io reads these on push: it fetches io.atcr.readme and shows + # the title/description/source/version on the image's page. + Labels = { + "org.opencontainers.image.title" = "DeepSky"; + "org.opencontainers.image.description" = "A Gemini window onto Bluesky."; + "org.opencontainers.image.source" = repoURL; + "org.opencontainers.image.documentation" = repoURL; + "org.opencontainers.image.version" = version; + "io.atcr.readme" = "${repoURL}/raw/main/README.md"; + }; }; }; in -- 2.51.2