From 29de2edfbbed21ac016f73a45d399795fc2e4dfb Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 23 Feb 2024 21:22:55 +0100 Subject: system, home: Validate ‘services’ field value. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This guides newcomers who might stick a single (service …) form in this field. * gnu/services.scm (validate-service-list): New macro. (%validate-service-list): New procedure. * gnu/system.scm ()[services]: Add ‘sanitize’. * gnu/home.scm ()[services]: Add ‘sanitize’. Change-Id: I9e29bd9a078e87b627ab766fd669ba9de79f8473 --- gnu/home.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gnu/home.scm') diff --git a/gnu/home.scm b/gnu/home.scm index 2fefe7ba53..b390c8d534 100644 --- a/gnu/home.scm +++ b/gnu/home.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021 Andrew Tropin -;;; Copyright © 2022 Ludovic Courtès +;;; Copyright © 2022, 2024 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -67,7 +67,8 @@ (define-record-type* home-environment this-home-environment))) (services home-environment-user-services - (default '())) + (default '()) + (sanitize validate-service-list)) (location home-environment-location ; (default (and=> (current-source-location) -- cgit v1.2.3