mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
services: configuration: Re-order generated record fields.
This is so that the first field of the generated record matches the first one declared, which makes 'define-configuration' record API compatible with define-record-type* ones. * gnu/services/configuration.scm (define-configuration-helper): Move the %location field below the ones declared by the user. * gnu/services/monitoring.scm (zabbix-front-end-config): Adjust match pattern accordingly.
This commit is contained in:
parent
8f9588185d
commit
543d971ed2
2 changed files with 7 additions and 7 deletions
|
@ -242,17 +242,17 @@ (define-record-type* #,(id #'stem #'< #'stem #'>)
|
|||
stem
|
||||
#,(id #'stem #'make- #'stem)
|
||||
#,(id #'stem #'stem #'?)
|
||||
(%location #,(id #'stem #'stem #'-location)
|
||||
(default (and=> (current-source-location)
|
||||
source-properties->location))
|
||||
(innate))
|
||||
#,@(map (lambda (name getter def)
|
||||
#`(#,name #,getter (default #,def)
|
||||
(sanitize
|
||||
#,(id #'stem #'validate- #'stem #'- name))))
|
||||
#'(field ...)
|
||||
#'(field-getter ...)
|
||||
#'(field-default ...)))
|
||||
#'(field-default ...))
|
||||
(%location #,(id #'stem #'stem #'-location)
|
||||
(default (and=> (current-source-location)
|
||||
source-properties->location))
|
||||
(innate)))
|
||||
|
||||
(define #,(id #'stem #'stem #'-fields)
|
||||
(list (configuration-field
|
||||
|
|
|
@ -622,8 +622,8 @@ (define-configuration zabbix-front-end-configuration
|
|||
|
||||
(define (zabbix-front-end-config config)
|
||||
(match-record config <zabbix-front-end-configuration>
|
||||
(%location db-host db-port db-name db-user db-password db-secret-file
|
||||
zabbix-host zabbix-port)
|
||||
(db-host db-port db-name db-user db-password db-secret-file
|
||||
zabbix-host zabbix-port %location)
|
||||
(mixed-text-file "zabbix.conf.php"
|
||||
"\
|
||||
<?php
|
||||
|
|
Loading…
Reference in a new issue