No, overlays only apply to packages (rather, attributes) within a nixpkgs instance. You can patch the nixpkgs instance or disable the module entirely, but in this case I’d just say to set it to an empty list.
programs.sway.extraPackages = [ ];
Kind of. If it’s part of your config, you have to know the option that controls its installation, then you can use nixos-option to find which modules set it. In this case it’s environment.systemPackages.
I personally find trying to use nixos-option environment.systemPackages to be a mess though, because it doesn’t tell you which values come from which modules - it just throws the whole module list at you. So, you can also use .definitionsWithLocations for a clearer visualization.
If your NixOS config does not use flakes (yes, I’m using nix eval here because nix-instantiate sucks doesn’t output helpful JSON for complex data types):
nix eval --experimental-features 'flakes nix-command' --impure \
--expr 'with (import <nixpkgs/nixos> {}); options.environment.systemPackages.definitionsWithLocations' \
-I nixos-config=/etc/nixos/configuration.nix --json | nix-shell -p jq --run jq
Or if it does use flakes:
nix eval /etc/nixos#nixosConfigurations.$(hostname).options.environment.systemPackages.definitionsWithLocations --json | nix run nixpkgs#jq
In either case, obviously replace the path to your config if it’s not located in /etc/nixos.
If the store path is not part of your config, then use nix-store --query --roots /nix/store/whatever and go from there. You can also use --deriver instead of --roots to get the store derivation but you won’t get the actual nix expression that created it.