diff options
author | Rodion Goritskov <rodion.goritskov@gmail.com> | 2024-04-15 00:48:43 +0400 |
---|---|---|
committer | Rodion Goritskov <rodion.goritskov@gmail.com> | 2024-04-15 00:48:43 +0400 |
commit | 05e8653429e9bda9e2019ce796afd256ec410298 (patch) | |
tree | c581479d5c4d1e64dd9ada7785b545427e9a790a | |
parent | 0547afb9d1fa12949eae81a3e5b16b114ba5ea32 (diff) |
More configuration
-rw-r--r-- | rodion/services/miniflux.scm | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/rodion/services/miniflux.scm b/rodion/services/miniflux.scm index fbd60ab..9ac78cc 100644 --- a/rodion/services/miniflux.scm +++ b/rodion/services/miniflux.scm @@ -15,6 +15,7 @@ miniflux-configuration-test?)) (define (initial-string? val) (string? val)) +(define (initial-boolean? val) (boolean? val)) (define (serialize-string field-name val) (format #f "~a=~a\n" (string-upcase @@ -25,16 +26,28 @@ (define (serialize-initial-string field-name val) (serialize-string (string-drop (symbol->string field-name) 8) val)) +(define (serialize-initial-boolean field-name val) + (serialize-boolean (string-drop (symbol->string field-name) 8) val)) + (define (non-negative-integer? val) (and (exact-integer? val) (not (negative? val)))) (define (serialize-non-negative-integer field-name val) (serialize-string field-name (number->string val))) +(define (serialize-boolean field-name val) + (if val (serialize-string field-name "1") "")) + (define-configuration miniflux-configuration - (port - (non-negative-integer 8080) - "Listening port") + (listen-addr + (string "127.0.0.1:8080") + "Address to listen on. Use absolute path for a Unix socket.") + (base-url + (string "http://localhost/") + "Base URL to generate HTML links and base path for cookies.") + (initial-create-admin + (initial-boolean #t) + "Create an initial admin") (initial-admin-username (initial-string "admin") "Initial admin username") @@ -51,6 +64,9 @@ (string "miniflux") "Group for the system account" empty-serializer) + (run-migrations + (boolean #t) + "Run database migrations during application startup.") (log-file (string "/var/log/miniflux.log") "Path to the log file" |