services: Make postgresql-password-file optional.

This commit is contained in:
Hilton Chain committed 2026-06-01 20:03:31 +08:00
1 parent 05f69100c3
commit d1c4b82750
1 file changed
+16 -6
+16 -6
View File
@@ -166,6 +166,7 @@
;;; Forgejo ;;; Forgejo
;;; ;;;
(define-maybe string)
(define list-of-file-likes? (define list-of-file-likes?
(list-of file-like?)) (list-of file-like?))
@@ -181,7 +182,7 @@
file-object-or-file-config file-object-or-file-config
"") "")
(postgresql-password-file (postgresql-password-file
string maybe-string
"") "")
(group-id (group-id
(user-and-group-id #f) (user-and-group-id #f)
@@ -212,7 +213,10 @@
(list (postgresql-role (list (postgresql-role
(name "forgejo") (name "forgejo")
(create-database? #t) (create-database? #t)
(password-file postgresql-password-file))))) (password-file
(if (maybe-value-set? postgresql-password-file)
postgresql-password-file
#f))))))
(define forgejo-activation (define forgejo-activation
#~(begin #~(begin
@@ -559,7 +563,7 @@ test its configuration file."))
(string "/var/log/misskey.log") (string "/var/log/misskey.log")
"Log file to use.") "Log file to use.")
(postgresql-password-file (postgresql-password-file
string maybe-string
"") "")
(no-serialization)) (no-serialization))
@@ -580,7 +584,10 @@ test its configuration file."))
(list (postgresql-role (list (postgresql-role
(name "misskey") (name "misskey")
(create-database? #t) (create-database? #t)
(password-file postgresql-password-file))))) (password-file
(if (maybe-value-set? postgresql-password-file)
postgresql-password-file
#f))))))
(define misskey-activation (define misskey-activation
(match-record-lambda <misskey-configuration> (match-record-lambda <misskey-configuration>
@@ -832,7 +839,7 @@ test its configuration file."))
(alist '()) (alist '())
"Extra options.") "Extra options.")
(postgresql-password-file (postgresql-password-file
string maybe-string
"") "")
(user-id (user-id
(user-and-group-id #f) (user-and-group-id #f)
@@ -856,7 +863,10 @@ test its configuration file."))
(list (postgresql-role (list (postgresql-role
(name "vaultwarden") (name "vaultwarden")
(create-database? #t) (create-database? #t)
(password-file postgresql-password-file))))) (password-file
(if (maybe-value-set? postgresql-password-file)
postgresql-password-file
#f))))))
(define vaultwarden-activation (define vaultwarden-activation
(match-record-lambda <vaultwarden-configuration> (match-record-lambda <vaultwarden-configuration>