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