mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2026-11-29 22:58:06 +00:00
utils: Add ini-file.
* modules/rosenthal/utils/file.scm (ini-file): New procedure. * modules/rosenthal/services/monitoring.scm (grafana-shepherd) * modules/rosenthal/services/web.scm (forgejo-shepherd-service): Use it. * modules/rosenthal/utils/serializers/ini.scm: Delete module.
This commit is contained in:
4 files changed
+27
-173
No files matched your search
@@ -6,8 +6,8 @@
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (guix modules)
|
||||
#:use-module (guix records)
|
||||
#:use-module (rosenthal utils file)
|
||||
#:use-module (rosenthal utils predicates)
|
||||
#:use-module (rosenthal utils serializers ini)
|
||||
#:use-module (rosenthal utils serializers yaml)
|
||||
;; Guix System
|
||||
#:use-module (gnu system shadow)
|
||||
@@ -99,7 +99,7 @@
|
||||
(file-like grafana-bin)
|
||||
"")
|
||||
(config
|
||||
ini-config
|
||||
gexp
|
||||
"")
|
||||
(postgresql-password-file
|
||||
string
|
||||
@@ -158,13 +158,7 @@
|
||||
(define grafana-shepherd
|
||||
(match-record-lambda <grafana-configuration>
|
||||
(grafana config shepherd-provision shepherd-requirement auto-start?)
|
||||
(let ((config-file
|
||||
(computed-file "grafana.ini"
|
||||
(with-extensions (list guile-ini guile-lib guile-smc)
|
||||
#~(begin
|
||||
(use-modules (srfi srfi-26) (ini))
|
||||
(call-with-output-file #$output
|
||||
(cut scm->ini '#$config #:port <>)))))))
|
||||
(let ((config-file (ini-file "grafana.ini" config)))
|
||||
(list (shepherd-service
|
||||
(provision shepherd-provision)
|
||||
(requirement `(loopback postgresql user-processes
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (guix modules)
|
||||
#:use-module (guix records)
|
||||
#:use-module (rosenthal utils file)
|
||||
#:use-module (rosenthal utils predicates)
|
||||
#:use-module (rosenthal utils serializers ini)
|
||||
#:use-module (rosenthal utils serializers yaml)
|
||||
;; Guix System
|
||||
#:use-module (gnu system privilege)
|
||||
@@ -281,7 +281,7 @@ reload its configuration file."))
|
||||
(list-of-file-likes (list git git-lfs))
|
||||
"@code{git} and extension packages to install.")
|
||||
(config
|
||||
ini-config
|
||||
gexp
|
||||
"")
|
||||
(postgresql-password-file
|
||||
string
|
||||
@@ -331,13 +331,7 @@ reload its configuration file."))
|
||||
(define forgejo-shepherd-service
|
||||
(match-record-lambda <forgejo-configuration>
|
||||
(forgejo config)
|
||||
(let ((config-file
|
||||
(computed-file "forgejo.ini"
|
||||
(with-extensions (list guile-ini guile-lib guile-smc)
|
||||
#~(begin
|
||||
(use-modules (srfi srfi-26) (ini))
|
||||
(call-with-output-file #$output
|
||||
(cut scm->ini '#$config #:port <>)))))))
|
||||
(let ((config-file (ini-file "forgejo.ini" config)))
|
||||
(list (shepherd-service
|
||||
(documentation "Run Forgejo.")
|
||||
(provision '(forgejo))
|
||||
|
||||
Reference in new issue
Block a user