Monorepo for Tangled
0

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>

Seongmin Lee (May 10, 2026, 12:53 AM +0900) bdb59a38 71f8a309

+28 -6
+5
appview/config/config.go
··· 149 149 Host string `env:"HOST, default=https://ogre.tangled.network"` 150 150 } 151 151 152 + type PorxieConfig struct { 153 + Url string `env:"URL"` // appview will default to PDS when porxie url is not configured 154 + } 155 + 152 156 func (cfg RedisConfig) ToURL() string { 153 157 u := &url.URL{ 154 158 Scheme: "redis", ··· 182 186 Sites SitesConfig `env:",prefix=TANGLED_SITES_"` 183 187 KnotMirror KnotMirrorConfig `env:",prefix=TANGLED_KNOTMIRROR_"` 184 188 Ogre OgreConfig `env:",prefix=TANGLED_OGRE_"` 189 + Porxie PorxieConfig `env:",prefix=TANGLED_PORXIE_"` 185 190 } 186 191 187 192 func LoadConfig(ctx context.Context) (*Config, error) {
+6 -1
appview/state/state.go
··· 120 120 121 121 mentionsResolver := mentions.New(config, res, d, log.SubLogger(logger, "mentionsResolver")) 122 122 123 - blobStore := blobstore.NewPdsBlobStore(res.Directory()) 123 + var blobStore blobstore.BlobStore 124 + if config.Porxie.Url != "" { 125 + blobStore = blobstore.NewPorxieBlobStore(config.Porxie.Url) 126 + } else { 127 + blobStore = blobstore.NewPdsBlobStore(res.Directory()) 128 + } 124 129 125 130 wrapper := db.DbWrapper{Execer: d} 126 131 jc, err := jetstream.NewJetstreamClient(
+1 -2
blobstore/porxie.go
··· 5 5 "fmt" 6 6 "io" 7 7 "net/http" 8 - "path" 9 8 10 9 "github.com/bluesky-social/indigo/atproto/syntax" 11 10 "github.com/ipfs/go-cid" ··· 20 19 } 21 20 22 21 func (s *Porxie) GetBlob(ctx context.Context, did syntax.DID, cid cid.Cid) (io.ReadCloser, error) { 23 - url := path.Join(s.url, did.String(), cid.String()) 22 + url := fmt.Sprintf("%s/%s/%s", s.url, did, cid) 24 23 resp, err := http.Get(url) 25 24 if err != nil { 26 25 return nil, err
+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
··· 76 76 host.port = 7200; 77 77 guest.port = 7200; 78 78 } 79 + { 80 + from = "host"; 81 + host.port = 6314; 82 + guest.port = 6314; 83 + } 79 84 ]; 80 85 sharedDirectories = { 81 86 # We can't use the 9p mounts directly for most of these ··· 147 152 local all tnglr trust 148 153 host all tnglr 127.0.0.1/32 trust 149 154 ''; 155 + }; 156 + services.porxie = { 157 + enable = true; 158 + settings = { 159 + PORXIE_SERVER_ADDRESS = "ip:0.0.0.0:6314"; 160 + PORXIE_BLOB_ALLOWED_MIMETYPES = ["application/gzip" "image/*" "text/plain"]; 161 + PORXIE_IDENTITY_PLC_URL = plcUrl; 162 + }; 150 163 }; 151 164 services.tangled.knotmirror = { 152 165 enable = true;