aboutsummaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorBruno Victal <mirai@makinata.eu>2023-03-26 19:41:32 +0100
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-04-14 15:12:11 -0400
commit865df7f080c64960f349fff79088427889e6c492 (patch)
tree52652ad954f4c91e091b17cf329d677130ce07fe /gnu/services
parent420adff18efd767f4848c79529c9929563bae21d (diff)
downloadguix-865df7f080c64960f349fff79088427889e6c492.tar.gz
guix-865df7f080c64960f349fff79088427889e6c492.zip
services: mpd: Use proper records for user and group fields.
Deprecate using strings for these fields and prefer user-account (resp. user-group) instead to avoid duplication within account-service-type. Fixes #61570 <https://issues.guix.gnu.org/61570>. * gnu/services/audio.scm (%mpd-user, %mpd-group) (mpd-serialize-user-account, mpd-serialize-user-group) (mpd-user-sanitizer, mpd-group-sanitizer): New variables. (mpd-configuration)[user]: Use user-account as value type. Sanitize via mpd-user-sanitizer. [group]: Use user-group as value type. Sanitize via mpd-group-sanitizer. (mpd-shepherd-service): Adjust accordingly. (mpd-accounts): Likewise. * doc/guix.texi (Audio Services)[Music Player Daemon]: Likewise. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/audio.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm
index 9ad63328c6..690409b7a1 100644
--- a/gnu/services/audio.scm
+++ b/gnu/services/audio.scm
@@ -140,6 +140,14 @@
(define list-of-symbol?
(list-of symbol?))
+;; Helpers for deprecated field types, to be removed later.
+(define %lazy-group (make-symbol "%lazy-group"))
+
+(define (%set-user-group user group)
+ (user-account
+ (inherit user)
+ (group (user-group-name group))))
+
;;;
;;; MPD