Subject: Re: [PATCH 04/17] services: mpd: Obsolete the 'group' field.

From: Liliana Marie Prikler <[email-masked]>
Date: Sun, 30 Apr 2023 00:07:26 +0200

Am Samstag, dem 29.04.2023 um 13:16 -0400 schrieb Maxim Cournoyer:
> This means we do not have to expose user-accounts at the
> <mpd-configuration>, which is not the right place for that anyway;
> it's already exposed via the users/groups fields of the <operating-
> system> record.
> 
> That's much easier to reason with, for both humans and the code, in
> my opinion.
We have the tools to make this meaningful with user-accounts already –
we've had them for some while in fact.

(operating-system
  ...
  (users (cons* alice bob mpd %base-user-accounts))
  (services (cons* (mpd-service (user (find mpd-user? users)))
                   %base-services))
  ...)

is a perfectly fine configuration given concrete values for alice, bob,
and mpd with mpd-user? matching the MPD user account by name.  The
point in providing user-accounts in the MPD service is so that the
right thing is done w.r.t. account creation regardless of whether the
user exists in users or not.  In the former case, it is checked that
definitions match (using pointer identity), in the latter the user is
automatically added.  "I will assume that a user by this name exists
even if it does not" is a recipe for shooting oneself in the knee.

Cheers