From a651926f552f8cde5231a789f663b2ac38827eec Mon Sep 17 00:00:00 2001 From: Sergey Trofimov Date: Thu, 8 Jan 2026 11:45:46 +0100 Subject: [PATCH] services: configuration: Generalize 'list-of-packages?' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/services/configuration.scm (list-of-packages?): Allow as well tuples of a package and its output. * gnu/home/services/sway.scm (list-of-packages): Remove duplicate. Change-Id: I42622a29ac808c76928e9056dee9330d5e1b3f39 Signed-off-by: Ludovic Courtès Merges: #5470 --- gnu/home/services/sway.scm | 3 --- gnu/services/configuration.scm | 5 ++++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/home/services/sway.scm b/gnu/home/services/sway.scm index 835053de1afffc5fcf93918ad663a47b83a0dceb..fcddbdbea206ca48f2bedbb23e7486fe1e7aea1f 100644 --- a/gnu/home/services/sway.scm +++ b/gnu/home/services/sway.scm @@ -129,9 +129,6 @@ (define (list-of-string-ish? lst) (every string-ish? lst)) -(define (list-of-packages? lst) - (every package? lst)) - (define (bar-position? p) (member p '(top bottom))) diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm index 886847b9bb70d6d8b4b7567de2e2576fd405406e..d42f04f1161dd7c22138558e2b14abfaac418401 100644 --- a/gnu/services/configuration.scm +++ b/gnu/services/configuration.scm @@ -535,7 +535,10 @@ the list result in @code{#t} when applying PRED? on them." #f))) (define list-of-packages? - (list-of package?)) + (list-of (match-lambda + ((? package? pkg) #t) + (((? package? pkg) output) #t) + (_ #f)))) (define list-of-strings? (list-of string?))