My Nix Configuration
2
fork

Configure Feed

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

[pkgs] voidauth: 1.11.2 -> 1.12.2

dish 76d55230 222fe47b

+31 -30
+2 -2
packages/voidauth/frontend.nix
··· 6 6 nix-update-script, 7 7 }: 8 8 buildNpmPackage (finalAttrs: { 9 - pname = "voidauth"; 9 + pname = "voidauth-frontend"; 10 10 inherit src version; 11 11 12 12 sourceRoot = "${finalAttrs.src.name}/frontend"; 13 13 14 - npmDepsHash = "sha256-xsOqxQGrwF9p40tdK5agMMAQ3/BWMk6AUz2h3KLN8Gw="; 14 + npmDepsHash = "sha256-a6Hskz2R9aMwU2BJgSgisZUT4Nyb/jeKCOpSD4OQRgw="; 15 15 npmBuildScript = "build"; 16 16 17 17 nativeBuildInputs = [
+26 -25
packages/voidauth/override-frontend-path.patch
··· 1 1 diff --git c/docs/Getting-Started.md w/docs/Getting-Started.md 2 - index a8ce6f4..61d5c0d 100644 2 + index 2effedc..7a864a6 100644 3 3 --- c/docs/Getting-Started.md 4 4 +++ w/docs/Getting-Started.md 5 - @@ -119,6 +119,7 @@ VoidAuth is configurable primarily by environment variable. The available enviro 5 + @@ -125,6 +125,7 @@ VoidAuth is configurable primarily by environment variable. The available enviro 6 6 | APP_COLOR | `#906bc7` | Theme color, rgb format; ex. #xxyyzz | | ✅ | 7 7 | APP_FONT | `monospace` | Font used in the web interface and sent emails. Safe fonts should be used, if a font is missing it will fallback to default. Multiple font families may be chosen in fallback-font format. ex. `APP_FONT: "Tahoma, Verdana, sans-serif"` | | | 8 8 | CONTACT_EMAIL | | The email address used for 'Contact' links, which are shown on most end-user pages if this is set. | | | ··· 10 10 11 11 #### Database Settings 12 12 When using the `sqlite` database adapter type, no additional database connection variables are required. You will need a mounted volume to hold the generated `db.sqlite` file, as shown in the SQLite docker compose example above. 13 - @@ -189,4 +190,3 @@ For information on how to change the email templates used for invitations, passw 13 + @@ -198,4 +199,3 @@ For information on how to change the email templates used for invitations, passw 14 14 15 15 ### Multi-Domain Protection 16 16 You can secure multiple domains you own by running multiple instances of VoidAuth using the same database. They should have the same **STORAGE_KEY** and **DB_\*** variables, but may otherwise have completely different configurations. The **APP_URL** variables of each would cover a different domain. If the domains you were trying to secure were `example.com` and `your-domain.net` you might set the **APP_URL** variables like `https://auth.example.com` and `https://id.your-domain.net`. These two instances would share everything in the shared DB, including users, OIDC Apps, ProxyAuth Domains, etc. 17 17 - 18 18 diff --git c/server/cli/server.ts w/server/cli/server.ts 19 - index bfd6e25..9d7b676 100644 19 + index f076cf2..39253b0 100644 20 20 --- c/server/cli/server.ts 21 21 +++ w/server/cli/server.ts 22 - @@ -18,9 +18,6 @@ import { createInitialAdmin } from '../db/user' 23 - import { logger } from '../util/logger' 24 - import { standardRateLimit } from '../util/rateLimit' 22 + @@ -20,7 +20,9 @@ import { sensitiveRateLimit, standardRateLimit } from '../util/rateLimit' 23 + import { FORBIDDEN_PATHS, NOT_FOUND_PATHS } from '@shared/constants' 25 24 26 - -const PROCESS_ROOT = path.dirname(process.argv[1] ?? '.') 25 + const PROCESS_ROOT = path.dirname(process.argv[1] ?? '.') 27 26 -const FE_ROOT = path.join(PROCESS_ROOT, '../frontend/dist/browser') 28 - - 27 + +const FE_ROOT = process.env.FRONTEND_PATH 28 + + ? path.resolve(process.env.FRONTEND_PATH) 29 + + : path.join(PROCESS_ROOT, '../frontend/dist/browser') 30 + 29 31 export async function serve() { 30 32 // Do not wait for theme to generate before starting 31 - void generateTheme() 32 - @@ -138,7 +135,7 @@ export async function serve() { 33 - }) 34 - 35 - // frontend 36 - - app.use(`${basePath()}/`, express.static(FE_ROOT, { 37 - + app.use(`${basePath()}/`, express.static(appConfig.FRONTEND_PATH, { 38 - index: false, 39 - fallthrough: true, 40 - })) 41 - @@ -172,7 +169,8 @@ export async function serve() { 33 + @@ -217,7 +219,7 @@ export async function serve() { 34 + } 35 + next() 36 + }, 37 + - express.static(FE_ROOT, { 38 + + express.static(appConfig.FRONTEND_PATH, { 39 + index: false, 40 + fallthrough: true, 41 + }), 42 + @@ -272,7 +274,8 @@ export async function serve() { 42 43 43 44 function modifyIndex() { 44 - // add APP_TITLE 45 + // add APP_TITLE 45 46 - let index = fs.readFileSync(path.join(FE_ROOT, './index.html')).toString().replace('<title>', '<title>' + appConfig.APP_TITLE) 46 47 + const indexPath = path.join(appConfig.FRONTEND_PATH, './index.html') 47 48 + let index = fs.readFileSync(indexPath).toString().replace('<title>', '<title>' + appConfig.APP_TITLE) ··· 49 50 // Replace base href with path of APP_URL 50 51 index = index.replace(/<base[^>]*href=[^>]*>/g, `<base href="${basePath()}/"/>`) 51 52 diff --git c/server/util/config.ts w/server/util/config.ts 52 - index 1e43667..e9f7efa 100644 53 + index 16a3a57..7801278 100644 53 54 --- c/server/util/config.ts 54 55 +++ w/server/util/config.ts 55 - @@ -7,12 +7,16 @@ import type { ClientResponse } from '@shared/api-response/ClientResponse.js' 56 - import Docker from 'dockerode' 57 - import { clientUpsertValidator } from '@shared/api-request/admin/ClientUpsert' 56 + @@ -8,12 +8,16 @@ import { clientUpsertValidator } from '@shared/api-request/admin/ClientUpsert' 58 57 import zod from 'zod' 58 + import type { SecureVersion } from 'node:tls' 59 + import { randomBytes } from 'node:crypto' 59 60 +import path from 'node:path' 60 61 + 61 62 +const PROCESS_ROOT = path.dirname(process.argv[1] ?? '.')
+3 -3
packages/voidauth/package.nix
··· 9 9 }: 10 10 buildNpmPackage (finalAttrs: { 11 11 pname = "voidauth"; 12 - version = "1.11.2"; 12 + version = "1.12.2"; 13 13 14 14 src = fetchFromGitHub { 15 15 owner = "voidauth"; 16 16 repo = "voidauth"; 17 17 tag = "v${finalAttrs.version}"; 18 - hash = "sha256-KMKwg2V/epw5oKhcboWH3xcEZbjvA86A3kv5pooa2HE="; 18 + hash = "sha256-JbxwlgKldI6UoZ5PSX3nfiHsWqeVbMS7wyC7QKdbdpk="; 19 19 }; 20 20 21 21 # Override frontend path with an environment variable so we don't need to copy it around ··· 48 48 echo '!dist/index.mjs' >> .npmignore 49 49 ''; 50 50 51 - npmDepsHash = "sha256-AWIy/DeStXoTHJv8Sk/Sqz0xJugOVg+zLq5TUv2PJ9U="; 51 + npmDepsHash = "sha256-36HGJ8Kg8kRg9n0q1MHVEyaJ+VCXcMecqsLk+Wgw0yc="; 52 52 npmBuildScript = "server:build"; 53 53 54 54 postInstall = ''