Monorepo for Tangled tangled.org
2

Configure Feed

Select the types of activity you want to include in your feed.

appview,nix: add porxie blob store

Signed-off-by: Seongmin Lee <git@boltless.me>

author
Seongmin Lee
date (Jun 17, 2026, 12:31 AM +0900) commit 2cea4a7b parent e0b06edd change-id ukrlypzz
+60 -4
+5
appview/config/config.go
··· 163 163 HostKeyPath string `env:"HOST_KEY_PATH"` 164 164 } 165 165 166 + type PorxieConfig struct { 167 + Url string `env:"URL"` // appview will default to PDS when porxie url is not configured 168 + } 169 + 166 170 func (cfg RedisConfig) ToURL() string { 167 171 u := &url.URL{ 168 172 Scheme: "redis", ··· 198 202 KnotMirror KnotMirrorConfig `env:",prefix=TANGLED_KNOTMIRROR_"` 199 203 Ogre OgreConfig `env:",prefix=TANGLED_OGRE_"` 200 204 SSH SSHConfig `env:",prefix=TANGLED_SSH_"` 205 + Porxie PorxieConfig `env:",prefix=TANGLED_PORXIE_"` 201 206 } 202 207 203 208 func LoadConfig(ctx context.Context) (*Config, error) {
+6 -1
appview/state/state.go
··· 129 129 130 130 mentionsResolver := mentions.New(config, res, d, log.SubLogger(logger, "mentionsResolver")) 131 131 132 - blobStore := blobstore.NewPdsBlobStore(res.Directory()) 132 + var blobStore blobstore.BlobStore 133 + if config.Porxie.Url != "" { 134 + blobStore = blobstore.NewPorxieBlobStore(config.Porxie.Url) 135 + } else { 136 + blobStore = blobstore.NewPdsBlobStore(res.Directory()) 137 + } 133 138 134 139 jc, err := jetstream.NewJetstreamClient( 135 140 config.Jetstream.Endpoint,
+33
blobstore/porxie.go
··· 1 + package blobstore 2 + 3 + import ( 4 + "context" 5 + "fmt" 6 + "io" 7 + "net/http" 8 + 9 + "github.com/bluesky-social/indigo/atproto/syntax" 10 + "github.com/ipfs/go-cid" 11 + ) 12 + 13 + type Porxie struct { 14 + url string 15 + } 16 + 17 + func NewPorxieBlobStore(url string) *Porxie { 18 + return &Porxie{url} 19 + } 20 + 21 + func (s *Porxie) GetBlob(ctx context.Context, did syntax.DID, cid cid.Cid) (io.ReadCloser, error) { 22 + url := fmt.Sprintf("%s/%s/%s", s.url, did, cid) 23 + resp, err := http.Get(url) 24 + if err != nil { 25 + return nil, err 26 + } 27 + 28 + if resp.StatusCode != http.StatusOK { 29 + return nil, fmt.Errorf("unexpected status: %s", resp.Status) 30 + } 31 + 32 + return resp.Body, nil 33 + }
+3 -3
flake.lock
··· 183 183 }, 184 184 "nixpkgs": { 185 185 "locked": { 186 - "lastModified": 1771848320, 187 - "narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=", 186 + "lastModified": 1777954456, 187 + "narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=", 188 188 "owner": "nixos", 189 189 "repo": "nixpkgs", 190 - "rev": "2fc6539b481e1d2569f25f8799236694180c0993", 190 + "rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1", 191 191 "type": "github" 192 192 }, 193 193 "original": {
+13
nix/vm.nix
··· 81 81 host.port = 7100; 82 82 guest.port = 7100; 83 83 } 84 + { 85 + from = "host"; 86 + host.port = 6314; 87 + guest.port = 6314; 88 + } 84 89 ]; 85 90 sharedDirectories = { 86 91 # We can't use the 9p mounts directly for most of these ··· 154 159 local all tnglr trust 155 160 host all tnglr 127.0.0.1/32 trust 156 161 ''; 162 + }; 163 + services.porxie = { 164 + enable = true; 165 + settings = { 166 + PORXIE_SERVER_ADDRESS = "ip:0.0.0.0:6314"; 167 + PORXIE_BLOB_ALLOWED_MIMETYPES = ["application/gzip" "image/*" "text/plain"]; 168 + PORXIE_IDENTITY_PLC_URL = plcUrl; 169 + }; 157 170 }; 158 171 services.tangled.knotmirror = { 159 172 enable = true;