forked from tangled.org/core
Monorepo for Tangled

cmd/genjwks: print to stdout instead of writing to file

also setup nix devshell to configure TANGLED_OAUTH_JWK in a shellhook
for seamless local oauth dev.

authored by oppi.li and committed by Tangled 7211bcfc 386422c4

Changed files
+4 -4
cmd
genjwks
+1 -4
cmd/genjwks/main.go
··· 8 8 "crypto/rand" 9 9 "encoding/json" 10 10 "fmt" 11 - "os" 12 11 "time" 13 12 14 13 "github.com/lestrrat-go/jwx/v2/jwk" ··· 36 35 panic(err) 37 36 } 38 37 39 - if err := os.WriteFile("./jwks.json", b, 0644); err != nil { 40 - panic(err) 41 - } 38 + fmt.Println(string(b)) 42 39 }
+3
flake.nix
··· 123 123 }; 124 124 repoguard = buildCmdPackage "repoguard"; 125 125 keyfetch = buildCmdPackage "keyfetch"; 126 + genjwks = buildCmdPackage "genjwks"; 126 127 }; 127 128 packages = forAllSystems (system: { 128 129 inherit ··· 133 134 knotserver-unwrapped 134 135 repoguard 135 136 keyfetch 137 + genjwks 136 138 ; 137 139 }); 138 140 defaultPackage = forAllSystems (system: nixpkgsFor.${system}.appview); ··· 162 164 cp -f ${inter-fonts-src}/web/InterVariable*.woff2 appview/pages/static/fonts/ 163 165 cp -f ${inter-fonts-src}/web/InterDisplay*.woff2 appview/pages/static/fonts/ 164 166 cp -f ${ibm-plex-mono-src}/fonts/complete/woff2/IBMPlexMono-Regular.woff2 appview/pages/static/fonts/ 167 + export TANGLED_OAUTH_JWKS="$(${pkgs.genjwks}/bin/genjwks)" 165 168 ''; 166 169 env.CGO_ENABLED = 1; 167 170 };