Oh-my-zsh: Adding system-wide custom plugin

I’m hoping to add a custom plugin to my configuration.nix so it gets added to all users. Currently, I have the following configuration which works:

  programs.zsh = {
    enable = true;
    enableGlobalCompInit = false;
    ohMyZsh = {
      enable = true;
      theme = "gentoo";
      customPkgs = with pkgs; [
        zsh-git-prompt
        zsh-nix-shell
        zsh-vi-mode
        zsh-completions
        zsh-command-time
        zsh-powerlevel10k
        zsh-fast-syntax-highlighting
        nix-zsh-completions
      ];
    };
  };

But now (and, right now preferably without home-manager because I want users to config their own home.nix and as I understand it, home-manager can’t both be globally installed (via configuration.nix) and by the user), I would like to add a plugin from GitHub: psgrep. How can I get this added, and load it?

Anyone who can help me with this, please?

I am suffering from this exact same problem as well. I want to install zsh-shift-select and I could get it to work.

The way I handle it, hope it helps :

{ config, pkgs, stdenv, ... }:
let
  docker-machine-prompt-p10k = pkgs.fetchFromGitHub {
    owner = "pomarec";
    repo = "docker-machine-prompt-p10k";
    rev = "master";
    hash = "sha256-I94/X50EbgL5JwgCl5pjNBKsa2Ilood/d9l9ANgO750=";
  };
in
{
  ...

  environment.systemPackages = with pkgs; [
    ...
    docker-machine-prompt-p10k
  ];

  programs.zsh = {
    enable = true;
    ...
    promptInit = ''
      ...
      source ${docker-machine-prompt-p10k}/docker-machine-prompt-p10k.plugin.zsh;
    '';
  };
}```