aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-10-28 17:06:16 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-11-15 16:26:16 -0500
commit543d971ed2a1d9eb934af1f51930741d7cc4e7ef (patch)
tree3ca04fab218a74c1966f68bb371a3acfa409f913 /gnu
parent8f9588185d74f1f251b041b84d43302c337588ff (diff)
downloadguix-543d971ed2a1d9eb934af1f51930741d7cc4e7ef.tar
guix-543d971ed2a1d9eb934af1f51930741d7cc4e7ef.tar.gz
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.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/services/configuration.scm10
-rw-r--r--gnu/services/monitoring.scm4
2 files changed, 7 insertions, 7 deletions
diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm
index 636c49ccba..dacfc52ba9 100644
--- a/gnu/services/configuration.scm
+++ b/gnu/services/configuration.scm
@@ -242,17 +242,17 @@ does not have a default value" field kind)))
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
diff --git a/gnu/services/monitoring.scm b/gnu/services/monitoring.scm
index 9c8704092c..b19c6c9f18 100644
--- a/gnu/services/monitoring.scm
+++ b/gnu/services/monitoring.scm
@@ -622,8 +622,8 @@ create it manually.")
(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