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