From d1c4b827507b520df18dd669a35fbf521866bf24 Mon Sep 17 00:00:00 2001 From: Hilton Chain Date: Sat, 30 May 2026 19:47:08 +0800 Subject: [PATCH] services: Make postgresql-password-file optional. --- modules/rosenthal/services/web.scm | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/modules/rosenthal/services/web.scm b/modules/rosenthal/services/web.scm index 4fa39b9..15d8eb2 100644 --- a/modules/rosenthal/services/web.scm +++ b/modules/rosenthal/services/web.scm @@ -166,6 +166,7 @@ ;;; Forgejo ;;; +(define-maybe string) (define list-of-file-likes? (list-of file-like?)) @@ -181,7 +182,7 @@ file-object-or-file-config "") (postgresql-password-file - string + maybe-string "") (group-id (user-and-group-id #f) @@ -212,7 +213,10 @@ (list (postgresql-role (name "forgejo") (create-database? #t) - (password-file postgresql-password-file))))) + (password-file + (if (maybe-value-set? postgresql-password-file) + postgresql-password-file + #f)))))) (define forgejo-activation #~(begin @@ -559,7 +563,7 @@ test its configuration file.")) (string "/var/log/misskey.log") "Log file to use.") (postgresql-password-file - string + maybe-string "") (no-serialization)) @@ -580,7 +584,10 @@ test its configuration file.")) (list (postgresql-role (name "misskey") (create-database? #t) - (password-file postgresql-password-file))))) + (password-file + (if (maybe-value-set? postgresql-password-file) + postgresql-password-file + #f)))))) (define misskey-activation (match-record-lambda @@ -832,7 +839,7 @@ test its configuration file.")) (alist '()) "Extra options.") (postgresql-password-file - string + maybe-string "") (user-id (user-and-group-id #f) @@ -856,7 +863,10 @@ test its configuration file.")) (list (postgresql-role (name "vaultwarden") (create-database? #t) - (password-file postgresql-password-file))))) + (password-file + (if (maybe-value-set? postgresql-password-file) + postgresql-password-file + #f)))))) (define vaultwarden-activation (match-record-lambda