diff options
| author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2025-04-10 16:05:43 +0900 |
|---|---|---|
| committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2025-04-14 10:34:51 +0900 |
| commit | f47ff4fccec1a5ec8b939e9d7f54dffb4ef673d9 (patch) | |
| tree | a9c6ae3a4c2b1c5a7887af9cc1c549824ace8e96 /gnu | |
| parent | 57768a7566e86cad5766cf45bc82dc0151742405 (diff) | |
services: ngircd: Allow specifying Shepherd requirements.
* gnu/services/messaging.scm (ngircd-configuration)
[shepherd-requirement]: New field.
* gnu/services/messaging.scm (ngircd-shepherd-service) [requirement]: Use it.
* doc/guix.texi (Messaging Services): Update doc.
Change-Id: I8164c132ca25830885005d0e8f55554047c84a95
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/services/messaging.scm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scm index 6a3569aa4cb..c0f1f83d66e 100644 --- a/gnu/services/messaging.scm +++ b/gnu/services/messaging.scm | |||
| @@ -68,6 +68,7 @@ | |||
| 68 | ngircd-configuration? | 68 | ngircd-configuration? |
| 69 | ngircd-configuration-ngircd | 69 | ngircd-configuration-ngircd |
| 70 | ngircd-configuration-debug? | 70 | ngircd-configuration-debug? |
| 71 | ngircd-configuration-shepherd-requirement | ||
| 71 | ngircd-configuration-global | 72 | ngircd-configuration-global |
| 72 | ngircd-configuration-limits | 73 | ngircd-configuration-limits |
| 73 | ngircd-configuration-options | 74 | ngircd-configuration-options |
| @@ -1415,6 +1416,10 @@ for different users. Refer to @samp{man 5 ngircd.conf} for more details.") | |||
| 1415 | (boolean #f) | 1416 | (boolean #f) |
| 1416 | "Turn on debugging messages." | 1417 | "Turn on debugging messages." |
| 1417 | (serializer empty-serializer)) | 1418 | (serializer empty-serializer)) |
| 1419 | (shepherd-requirement | ||
| 1420 | (list-of-symbols '(user-processes)) | ||
| 1421 | "Shepherd requirements the service should depend on." | ||
| 1422 | (serializer empty-serializer)) | ||
| 1418 | (global | 1423 | (global |
| 1419 | ;; Always use a ngircd-global default to ensure the default addresses | 1424 | ;; Always use a ngircd-global default to ensure the default addresses |
| 1420 | ;; listened to are known (used to compute the socket endpoints). | 1425 | ;; listened to are known (used to compute the socket endpoints). |
| @@ -1583,7 +1588,7 @@ wrapper for the 'ngircd' command." | |||
| 1583 | 1588 | ||
| 1584 | (define (ngircd-shepherd-service config) | 1589 | (define (ngircd-shepherd-service config) |
| 1585 | (match-record config <ngircd-configuration> | 1590 | (match-record config <ngircd-configuration> |
| 1586 | (ngircd debug? global ssl) | 1591 | (ngircd debug? global shepherd-requirement ssl) |
| 1587 | (let* ((ngircd.conf (serialize-ngircd-configuration config)) | 1592 | (let* ((ngircd.conf (serialize-ngircd-configuration config)) |
| 1588 | (ngircd (file-append ngircd "/sbin/ngircd")) | 1593 | (ngircd (file-append ngircd "/sbin/ngircd")) |
| 1589 | (addresses (ngircd-global-listen global)) | 1594 | (addresses (ngircd-global-listen global)) |
| @@ -1594,7 +1599,7 @@ wrapper for the 'ngircd' command." | |||
| 1594 | ports*))) | 1599 | ports*))) |
| 1595 | (list (shepherd-service | 1600 | (list (shepherd-service |
| 1596 | (provision '(ngircd)) | 1601 | (provision '(ngircd)) |
| 1597 | (requirement '(user-processes networking syslogd)) | 1602 | (requirement shepherd-requirement) |
| 1598 | (modules (cons '(srfi srfi-1) %default-modules)) | 1603 | (modules (cons '(srfi srfi-1) %default-modules)) |
| 1599 | (actions (list (shepherd-configuration-action ngircd.conf))) | 1604 | (actions (list (shepherd-configuration-action ngircd.conf))) |
| 1600 | (start #~(make-systemd-constructor | 1605 | (start #~(make-systemd-constructor |
