anchor.diff:  with lib;
   
   let
  +
  +  name = "mpd";
   
     uid = config.ids.uids.mpd;
     gid = config.ids.gids.mpd;
  
positive.code:         description = ''
            Extra directives added to to the end of MPD's configuration file,
            mpd.conf. Basic configuration like file location and uid/gid
            is added automatically to the beginning of the file.
          '';
        };
  
        dataDir = mkOption {
          type = types.path;
          default = "/var/lib/mpd";
          description = ''
            The directory where MPD stores its state, tag cache,
            playlists etc.
  
negative.code:       };
      };
  
      users.extraUsers = optionalAttrs (cfg.user == name) (singleton {
        inherit uid;
        inherit name;
        group = cfg.group;
        extraGroups = [ "audio" ];
        description = "Music Player Daemon user";
        home = "${cfg.dataDir}";
      });
  
      users.extraGroups = optionalAttrs (cfg.group == name) (singleton {
        inherit name;
        gid = gid;
      });
    };
  