anchor.diff:  
       users.extraUsers = optionalAttrs (cfg.user == "nginx") (singleton
         { name = "nginx";
  -        group = "nginx";
  +        group = cfg.group;
           uid = config.ids.uids.nginx;
         });
   
  
positive.code:       preStart =
          ''
          mkdir -p ${cfg.stateDir}/logs
          chown -R ${cfg.user}:${cfg.group} ${cfg.stateDir}
          '';
        serviceConfig = {
  
negative.code:   };
  
    config = mkIf cfg.enable {
      # TODO: test user supplied config file pases syntax test
  
      systemd.services.nginx = {
  