anchor.diff:                ln -sfn "${pkgs.writeText "recovery.conf" cfg.recoveryConfig}" \
                   "${cfg.dataDir}/recovery.conf"
               ''}
  -            chmod ${dirMode} "${cfg.dataDir}"
  +            ${optionalString (cfg.groupAccess != null) ''
  +              chmod ${dirMode} "${cfg.dataDir}"
  +            ''}
   
               exec postgres
             '';
  
positive.code:                   else "/var/db/postgresql");
  
      services.postgresql.initdbArgs =
        mkBefore (optional cfg.groupAccess "--allow-group-access");
  
      services.postgresql.authentication = mkAfter
        ''
  
negative.code:   config = mkIf cfg.enable {
  
      assertions = [
        { assertion = cfg.groupAccess == true -> versionAtLeast cfg.package.version "11.0";
          message = ''
            'groupAccess' is not available for PostgreSQL < 11.
          '';
  