mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2025-11-16 09:24:58 +00:00
Compare commits
2 Commits
cae3691f06
...
88283b8d95
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
88283b8d95 | ||
|
|
367ca98a48 |
@ -27,9 +27,6 @@
|
|||||||
cloudflare-warp-configuration
|
cloudflare-warp-configuration
|
||||||
cloudflare-warp-service-type
|
cloudflare-warp-service-type
|
||||||
|
|
||||||
miniflux-configuration
|
|
||||||
miniflux-service-type
|
|
||||||
|
|
||||||
home-wakapi-configuration
|
home-wakapi-configuration
|
||||||
home-wakapi-service-type
|
home-wakapi-service-type
|
||||||
|
|
||||||
@ -249,82 +246,6 @@ headers. This can expose sensitive information in your logs.")
|
|||||||
(default-value (cloudflare-warp-configuration))
|
(default-value (cloudflare-warp-configuration))
|
||||||
(description "Run warp-svc, the Cloudflare Warp daemon.")))
|
(description "Run warp-svc, the Cloudflare Warp daemon.")))
|
||||||
|
|
||||||
|
|
||||||
;;;
|
|
||||||
;;; Miniflux
|
|
||||||
;;;
|
|
||||||
|
|
||||||
|
|
||||||
(define-maybe string)
|
|
||||||
|
|
||||||
(define-configuration miniflux-configuration
|
|
||||||
(miniflux
|
|
||||||
(file-like miniflux)
|
|
||||||
"The miniflux package.")
|
|
||||||
(log-file
|
|
||||||
(string "/var/log/miniflux.log")
|
|
||||||
"Where the logs go.")
|
|
||||||
(proxy-url
|
|
||||||
maybe-string
|
|
||||||
"Proxy URL to use.")
|
|
||||||
(options
|
|
||||||
(alist '())
|
|
||||||
"Association list of miniflux configuration options.")
|
|
||||||
(no-serialization))
|
|
||||||
|
|
||||||
(define %miniflux-accounts
|
|
||||||
(list (user-account
|
|
||||||
(name "miniflux")
|
|
||||||
(group "nogroup")
|
|
||||||
(system? #t)
|
|
||||||
(home-directory "/var/empty")
|
|
||||||
(shell (file-append shadow "/sbin/nologin")))))
|
|
||||||
|
|
||||||
(define %miniflux-postgresql-role
|
|
||||||
(list (postgresql-role
|
|
||||||
(name "miniflux")
|
|
||||||
(create-database? #t))))
|
|
||||||
|
|
||||||
(define miniflux-shepherd-service
|
|
||||||
(match-record-lambda <miniflux-configuration>
|
|
||||||
(miniflux log-file proxy-url options)
|
|
||||||
(let ((config-file (mixed-text-file
|
|
||||||
"miniflux.conf"
|
|
||||||
(apply string-append
|
|
||||||
(map (lambda (option)
|
|
||||||
(format #f "~a=~a~%"
|
|
||||||
(car option) (cdr option)))
|
|
||||||
options)))))
|
|
||||||
(list (shepherd-service
|
|
||||||
(documentation "Run miniflux.")
|
|
||||||
(provision '(miniflux))
|
|
||||||
(requirement '(postgres user-processes))
|
|
||||||
(start #~(make-forkexec-constructor
|
|
||||||
(list #$(file-append miniflux "/bin/miniflux")
|
|
||||||
"-config-file" #$config-file)
|
|
||||||
#:user "miniflux"
|
|
||||||
#:group "nogroup"
|
|
||||||
#:log-file #$log-file
|
|
||||||
#:environment-variables
|
|
||||||
'#$(if (maybe-value-set? proxy-url)
|
|
||||||
(list (string-append "HTTP_PROXY=" proxy-url)
|
|
||||||
(string-append "HTTPS_PROXY=" proxy-url))
|
|
||||||
'())))
|
|
||||||
(stop #~(make-kill-destructor)))))))
|
|
||||||
|
|
||||||
(define miniflux-service-type
|
|
||||||
(service-type
|
|
||||||
(name 'miniflux)
|
|
||||||
(extensions
|
|
||||||
(list (service-extension account-service-type
|
|
||||||
(const %miniflux-accounts))
|
|
||||||
(service-extension postgresql-role-service-type
|
|
||||||
(const %miniflux-postgresql-role))
|
|
||||||
(service-extension shepherd-root-service-type
|
|
||||||
miniflux-shepherd-service)))
|
|
||||||
(default-value (miniflux-configuration))
|
|
||||||
(description "Run Miniflux, a minimalist and opinionated feed reader.")))
|
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; Wakapi
|
;;; Wakapi
|
||||||
|
|||||||
@ -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