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 @@ does not have a default value" field kind))) | ||||||
|                stem |                stem | ||||||
|                #,(id #'stem #'make- #'stem) |                #,(id #'stem #'make- #'stem) | ||||||
|                #,(id #'stem #'stem #'?) |                #,(id #'stem #'stem #'?) | ||||||
|                (%location #,(id #'stem #'stem #'-location) |  | ||||||
|                           (default (and=> (current-source-location) |  | ||||||
|                                           source-properties->location)) |  | ||||||
|                           (innate)) |  | ||||||
|                #,@(map (lambda (name getter def) |                #,@(map (lambda (name getter def) | ||||||
|                          #`(#,name #,getter (default #,def) |                          #`(#,name #,getter (default #,def) | ||||||
|                                    (sanitize |                                    (sanitize | ||||||
|                                     #,(id #'stem #'validate- #'stem #'- name)))) |                                     #,(id #'stem #'validate- #'stem #'- name)))) | ||||||
|                        #'(field ...) |                        #'(field ...) | ||||||
|                        #'(field-getter ...) |                        #'(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) |              (define #,(id #'stem #'stem #'-fields) | ||||||
|                (list (configuration-field |                (list (configuration-field | ||||||
|  |  | ||||||
|  | @ -622,8 +622,8 @@ create it manually.") | ||||||
| 
 | 
 | ||||||
| (define (zabbix-front-end-config config) | (define (zabbix-front-end-config config) | ||||||
|   (match-record config <zabbix-front-end-configuration> |   (match-record config <zabbix-front-end-configuration> | ||||||
|     (%location db-host db-port db-name db-user db-password db-secret-file |     (db-host db-port db-name db-user db-password db-secret-file | ||||||
|                zabbix-host zabbix-port) |              zabbix-host zabbix-port %location) | ||||||
|     (mixed-text-file "zabbix.conf.php" |     (mixed-text-file "zabbix.conf.php" | ||||||
|                      "\ |                      "\ | ||||||
| <?php | <?php | ||||||
|  |  | ||||||
		Reference in a new issue