How-To add "nixpkgs.config.allowUnfreePredicate" in my existing config

Hi

Sorry I am not good with syntax

I wish to move away from Homebrew

This my config (working)

cat flake.nix
        {
          inputs = {
            nixpkgs.url = "github:NixOS/nixpkgs";
          };

          outputs = { self, nixpkgs }: {
            packages."aarch64-darwin".default = let
              pkgs = nixpkgs.legacyPackages."aarch64-darwin";
            in pkgs.buildEnv {
              name = "home-packages";
              paths = with pkgs; [
                git
                bat
                borgbackup
                coreutils
                curl
                fdupes
                watch
                nmap
                ffmpeg
                findutils
                git-lfs
                htop
                lsd
                mat2
                mdcat
                megatools
                mpv
                p7zip
                pwgen
                rsync
                rtmpdump
                starship
                tmux
                topgrade
                gnused
                gnutar
#               vcs
                wget
                yt-dlp
                zsh-autosuggestions
                zsh-syntax-highlighting
              ];
            };
          };

        }

Now I wish to allow specific “unfree” apps / I don’t know how to add this part to the config. I get syntax errors.

Alternatively you can configure a predicate to allow specific packages:  
{ nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [  
"vcs"  
];  
}

thanks