mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2025-10-14 01:14:35 +00:00
services: Add postgresql-password-file option.
* modules/rosenthal/services/monitoring.scm (grafana-configuration) * modules/rosenthal/services/web.scm (forgejo-configuration) (misskey-configuration, vaultwarden-configuration): Add postgresql-password-file option. * modules/rosenthal/services/monitoring.scm (grafana-postgresql-role) * modules/rosenthal/services/web.scm (forgejo-postgresql-role) (forgejo-service-type, misskey-postgresql-role, misskey-service-type) (vaultwarden-postgresql-role, vaultwarden-service-type): Adjust accordingly.
This commit is contained in:
parent
cae3691f06
commit
367ca98a48
@ -96,6 +96,9 @@
|
|||||||
(config
|
(config
|
||||||
ini-config
|
ini-config
|
||||||
"")
|
"")
|
||||||
|
(postgresql-password-file
|
||||||
|
string
|
||||||
|
"")
|
||||||
(shepherd-provision
|
(shepherd-provision
|
||||||
(list-of-symbols '(grafana))
|
(list-of-symbols '(grafana))
|
||||||
"")
|
"")
|
||||||
@ -117,10 +120,12 @@
|
|||||||
(home-directory "/var/lib/grafana")))))
|
(home-directory "/var/lib/grafana")))))
|
||||||
|
|
||||||
(define grafana-postgresql-role
|
(define grafana-postgresql-role
|
||||||
(lambda _
|
(match-record-lambda <grafana-configuration>
|
||||||
|
(postgresql-password-file)
|
||||||
(list (postgresql-role
|
(list (postgresql-role
|
||||||
(name "grafana")
|
(name "grafana")
|
||||||
(create-database? #t)))))
|
(create-database? #t)
|
||||||
|
(password-file postgresql-password-file)))))
|
||||||
|
|
||||||
(define grafana-activation
|
(define grafana-activation
|
||||||
(lambda _
|
(lambda _
|
||||||
|
@ -149,7 +149,6 @@ reload its configuration file."))
|
|||||||
caddy-privileged-programs)
|
caddy-privileged-programs)
|
||||||
(service-extension shepherd-root-service-type
|
(service-extension shepherd-root-service-type
|
||||||
caddy-shepherd-services)))
|
caddy-shepherd-services)))
|
||||||
(default-value #f)
|
|
||||||
(description "")))
|
(description "")))
|
||||||
|
|
||||||
|
|
||||||
@ -176,6 +175,9 @@ reload its configuration file."))
|
|||||||
(config
|
(config
|
||||||
ini-config
|
ini-config
|
||||||
"")
|
"")
|
||||||
|
(postgresql-password-file
|
||||||
|
string
|
||||||
|
"")
|
||||||
(no-serialization))
|
(no-serialization))
|
||||||
|
|
||||||
(define %forgejo-accounts
|
(define %forgejo-accounts
|
||||||
@ -187,10 +189,13 @@ reload its configuration file."))
|
|||||||
(comment "Forgejo user")
|
(comment "Forgejo user")
|
||||||
(home-directory "/var/lib/forgejo"))))
|
(home-directory "/var/lib/forgejo"))))
|
||||||
|
|
||||||
(define %forgejo-postgresql-role
|
(define forgejo-postgresql-role
|
||||||
(list (postgresql-role
|
(match-record-lambda <forgejo-configuration>
|
||||||
(name "forgejo")
|
(postgresql-password-file)
|
||||||
(create-database? #t))))
|
(list (postgresql-role
|
||||||
|
(name "forgejo")
|
||||||
|
(create-database? #t)
|
||||||
|
(password-file postgresql-password-file)))))
|
||||||
|
|
||||||
(define forgejo-activation
|
(define forgejo-activation
|
||||||
#~(begin
|
#~(begin
|
||||||
@ -244,9 +249,11 @@ reload its configuration file."))
|
|||||||
(list (service-extension account-service-type
|
(list (service-extension account-service-type
|
||||||
(const %forgejo-accounts))
|
(const %forgejo-accounts))
|
||||||
(service-extension postgresql-role-service-type
|
(service-extension postgresql-role-service-type
|
||||||
(const %forgejo-postgresql-role))
|
forgejo-postgresql-role)
|
||||||
(service-extension profile-service-type
|
(service-extension profile-service-type
|
||||||
forgejo-configuration-git-packages)
|
(lambda (config)
|
||||||
|
(cons (forgejo-configuration-forgejo config)
|
||||||
|
(forgejo-configuration-git-packages config))))
|
||||||
(service-extension activation-service-type
|
(service-extension activation-service-type
|
||||||
(const forgejo-activation))
|
(const forgejo-activation))
|
||||||
(service-extension shepherd-root-service-type
|
(service-extension shepherd-root-service-type
|
||||||
@ -501,6 +508,9 @@ test its configuration file."))
|
|||||||
(log-file
|
(log-file
|
||||||
(string "/var/log/misskey.log")
|
(string "/var/log/misskey.log")
|
||||||
"Log file to use.")
|
"Log file to use.")
|
||||||
|
(postgresql-password-file
|
||||||
|
string
|
||||||
|
"")
|
||||||
(no-serialization))
|
(no-serialization))
|
||||||
|
|
||||||
(define %misskey-accounts
|
(define %misskey-accounts
|
||||||
@ -511,10 +521,13 @@ test its configuration file."))
|
|||||||
(home-directory "/var/empty")
|
(home-directory "/var/empty")
|
||||||
(shell (file-append shadow "/sbin/nologin")))))
|
(shell (file-append shadow "/sbin/nologin")))))
|
||||||
|
|
||||||
(define %misskey-postgresql-role
|
(define misskey-postgresql-role
|
||||||
(list (postgresql-role
|
(match-record-lambda <misskey-configuration>
|
||||||
(name "misskey")
|
(postgresql-password-file)
|
||||||
(create-database? #t))))
|
(list (postgresql-role
|
||||||
|
(name "misskey")
|
||||||
|
(create-database? #t)
|
||||||
|
(password-file postgresql-password-file)))))
|
||||||
|
|
||||||
(define misskey-activation
|
(define misskey-activation
|
||||||
(match-record-lambda <misskey-configuration>
|
(match-record-lambda <misskey-configuration>
|
||||||
@ -559,7 +572,7 @@ test its configuration file."))
|
|||||||
(list (service-extension account-service-type
|
(list (service-extension account-service-type
|
||||||
(const %misskey-accounts))
|
(const %misskey-accounts))
|
||||||
(service-extension postgresql-role-service-type
|
(service-extension postgresql-role-service-type
|
||||||
(const %misskey-postgresql-role))
|
misskey-postgresql-role)
|
||||||
(service-extension log-rotation-service-type
|
(service-extension log-rotation-service-type
|
||||||
(compose list misskey-configuration-log-file))
|
(compose list misskey-configuration-log-file))
|
||||||
(service-extension activation-service-type
|
(service-extension activation-service-type
|
||||||
@ -667,6 +680,9 @@ test its configuration file."))
|
|||||||
(extra-options
|
(extra-options
|
||||||
(alist '())
|
(alist '())
|
||||||
"Extra options.")
|
"Extra options.")
|
||||||
|
(postgresql-password-file
|
||||||
|
string
|
||||||
|
"")
|
||||||
(no-serialization))
|
(no-serialization))
|
||||||
|
|
||||||
(define %vaultwarden-accounts
|
(define %vaultwarden-accounts
|
||||||
@ -677,10 +693,13 @@ test its configuration file."))
|
|||||||
(home-directory "/var/empty")
|
(home-directory "/var/empty")
|
||||||
(shell (file-append shadow "/sbin/nologin")))))
|
(shell (file-append shadow "/sbin/nologin")))))
|
||||||
|
|
||||||
(define %vaultwarden-postgresql-role
|
(define vaultwarden-postgresql-role
|
||||||
(list (postgresql-role
|
(match-record-lambda <vaultwarden-configuration>
|
||||||
(name "vaultwarden")
|
(postgresql-password-file)
|
||||||
(create-database? #t))))
|
(list (postgresql-role
|
||||||
|
(name "vaultwarden")
|
||||||
|
(create-database? #t)
|
||||||
|
(password-file postgresql-password-file)))))
|
||||||
|
|
||||||
(define vaultwarden-activation
|
(define vaultwarden-activation
|
||||||
(match-record-lambda <vaultwarden-configuration>
|
(match-record-lambda <vaultwarden-configuration>
|
||||||
@ -738,12 +757,11 @@ test its configuration file."))
|
|||||||
(list (service-extension account-service-type
|
(list (service-extension account-service-type
|
||||||
(const %vaultwarden-accounts))
|
(const %vaultwarden-accounts))
|
||||||
(service-extension postgresql-role-service-type
|
(service-extension postgresql-role-service-type
|
||||||
(const %vaultwarden-postgresql-role))
|
vaultwarden-postgresql-role)
|
||||||
(service-extension activation-service-type
|
(service-extension activation-service-type
|
||||||
vaultwarden-activation)
|
vaultwarden-activation)
|
||||||
(service-extension log-rotation-service-type
|
(service-extension log-rotation-service-type
|
||||||
(compose list vaultwarden-configuration-log-file))
|
(compose list vaultwarden-configuration-log-file))
|
||||||
(service-extension oci-container-service-type
|
(service-extension oci-container-service-type
|
||||||
vaultwarden-oci-containers)))
|
vaultwarden-oci-containers)))
|
||||||
(default-value (vaultwarden-configuration))
|
|
||||||
(description "Run Vaultwarden, a Bitwarden compatible server.")))
|
(description "Run Vaultwarden, a Bitwarden compatible server.")))
|
||||||
|
Loading…
Reference in New Issue
Block a user