mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-28 12:01:49 +02:00
services: Add a default configuration value for the ngircd service.
* gnu/services/messaging.scm (ngircd-configuration): Adjust comment. (ngircd-wrapper): Nest bindings within the (maybe-value-set? ssl) check, to avoid errors when not providing an explicit value to the ssl field. (ngircd-service-type) [default-value]: New field. Change-Id: I1d2d7973cc9314e9bbc5870bf7b5f872d074b49b
This commit is contained in:
+8
-1
@@ -30363,7 +30363,14 @@ server.
|
|||||||
The service type for ngIRCd. Its value is a @code{ngircd-configuration}
|
The service type for ngIRCd. Its value is a @code{ngircd-configuration}
|
||||||
object, documented below.
|
object, documented below.
|
||||||
|
|
||||||
A simple example configuration could look like:
|
In its most simple form, the service can be used with its default
|
||||||
|
configuration, like this:
|
||||||
|
|
||||||
|
@lisp
|
||||||
|
(service ngircd-service-type)
|
||||||
|
@end lisp
|
||||||
|
|
||||||
|
A slightly more complex example configuration could look like:
|
||||||
|
|
||||||
@lisp
|
@lisp
|
||||||
(service ngircd-service-type
|
(service ngircd-service-type
|
||||||
|
|||||||
+29
-28
@@ -1416,8 +1416,8 @@ for different users. Refer to @samp{man 5 ngircd.conf} for more details.")
|
|||||||
"Turn on debugging messages."
|
"Turn on debugging messages."
|
||||||
(serializer empty-serializer))
|
(serializer empty-serializer))
|
||||||
(global
|
(global
|
||||||
;; Always use a ngircd-global default to ensure the correct PidFile option
|
;; Always use a ngircd-global default to ensure the default addresses
|
||||||
;; is set, as it is required by the service.
|
;; listened to are known (used to compute the socket endpoints).
|
||||||
(ngircd-global (ngircd-global))
|
(ngircd-global (ngircd-global))
|
||||||
"A ngircd-global record object used to specify global options.")
|
"A ngircd-global record object used to specify global options.")
|
||||||
(limits
|
(limits
|
||||||
@@ -1515,10 +1515,6 @@ wrapper for the 'ngircd' command."
|
|||||||
(help-file (ngircd-global-help-file global))
|
(help-file (ngircd-global-help-file global))
|
||||||
(motd-file (ngircd-global-motd-file global))
|
(motd-file (ngircd-global-motd-file global))
|
||||||
(ssl (ngircd-configuration-ssl config))
|
(ssl (ngircd-configuration-ssl config))
|
||||||
(ca-file (ngircd-ssl-ca-file ssl))
|
|
||||||
(cert-file (ngircd-ssl-cert-file ssl))
|
|
||||||
(key-file (ngircd-ssl-key-file ssl))
|
|
||||||
(dh-file (ngircd-ssl-dh-file ssl))
|
|
||||||
(channels (ngircd-configuration-channels config)))
|
(channels (ngircd-configuration-channels config)))
|
||||||
(least-authority-wrapper
|
(least-authority-wrapper
|
||||||
(file-append (ngircd-configuration-ngircd config) "/sbin/ngircd")
|
(file-append (ngircd-configuration-ngircd config) "/sbin/ngircd")
|
||||||
@@ -1545,28 +1541,32 @@ wrapper for the 'ngircd' command."
|
|||||||
(target source)))
|
(target source)))
|
||||||
'())
|
'())
|
||||||
(if (maybe-value-set? ssl)
|
(if (maybe-value-set? ssl)
|
||||||
;; When SSL is used, expose the specified keys and certificates.
|
(let ((ca-file (ngircd-ssl-ca-file ssl))
|
||||||
(append
|
(cert-file (ngircd-ssl-cert-file ssl))
|
||||||
(if (maybe-value-set? ca-file)
|
(key-file (ngircd-ssl-key-file ssl))
|
||||||
(list (file-system-mapping
|
(dh-file (ngircd-ssl-dh-file ssl)))
|
||||||
(source ca-file)
|
;; When SSL is used, expose the specified keys and certificates.
|
||||||
(target source)))
|
(append
|
||||||
'())
|
(if (maybe-value-set? ca-file)
|
||||||
(if (maybe-value-set? cert-file)
|
(list (file-system-mapping
|
||||||
(list (file-system-mapping
|
(source ca-file)
|
||||||
(source cert-file)
|
(target source)))
|
||||||
(target source)))
|
'())
|
||||||
'())
|
(if (maybe-value-set? cert-file)
|
||||||
(if (maybe-value-set? key-file)
|
(list (file-system-mapping
|
||||||
(list (file-system-mapping
|
(source cert-file)
|
||||||
(source key-file)
|
(target source)))
|
||||||
(target source)))
|
'())
|
||||||
'())
|
(if (maybe-value-set? key-file)
|
||||||
(if (maybe-value-set? dh-file)
|
(list (file-system-mapping
|
||||||
(list (file-system-mapping
|
(source key-file)
|
||||||
(source dh-file)
|
(target source)))
|
||||||
(target source)))
|
'())
|
||||||
'()))
|
(if (maybe-value-set? dh-file)
|
||||||
|
(list (file-system-mapping
|
||||||
|
(source dh-file)
|
||||||
|
(target source)))
|
||||||
|
'())))
|
||||||
'())
|
'())
|
||||||
(if (maybe-value-set? channels)
|
(if (maybe-value-set? channels)
|
||||||
(filter-map (lambda (channel)
|
(filter-map (lambda (channel)
|
||||||
@@ -1631,6 +1631,7 @@ wrapper for the 'ngircd' command."
|
|||||||
(compose list ngircd-configuration-ngircd))
|
(compose list ngircd-configuration-ngircd))
|
||||||
(service-extension account-service-type
|
(service-extension account-service-type
|
||||||
ngircd-account)))
|
ngircd-account)))
|
||||||
|
(default-value (ngircd-configuration))
|
||||||
(description
|
(description
|
||||||
"Run @url{https://ngircd.barton.de/, ngIRCd}, a lightweight @acronym{IRC,
|
"Run @url{https://ngircd.barton.de/, ngIRCd}, a lightweight @acronym{IRC,
|
||||||
Internet Relay Chat} daemon.")))
|
Internet Relay Chat} daemon.")))
|
||||||
|
|||||||
Reference in New Issue
Block a user