Unable to load zsh theme

I am newbie to nixos, I have installed nixos on macOS BigSur.

I followed instructions Set up nix & home-manager in macoS Big Sur 11 · GitHub

With the following zsh config


{
  programs.zsh = {
    
    enable = true;
    enableAutosuggestions = true;
    enableSyntaxHighlighting = true;

    zplug = {
      enable = true;
      plugins = [{
        name = "dracula/zsh";
        tags = [ "as:theme" "depth:1" ];
      }];
    };

    oh-my-zsh = {
       enable = true;
       theme = "robbyrussel";
    };
  
  };

}

I see the following error when the shell starts,

/nix/store/4karx4fkzchyyz7pa6j5gbhz5djn4jxv-oh-my-zsh-2021-09-22/share/oh-my-zsh/oh-my-zsh.sh:source:137: no such file or directory: /nix/store/4karx4fkzchyyz7pa6j5gbhz5djn4jxv-oh-my-zsh-2021-09-22/share/oh-my-zsh/themes/robbyrussel.zsh-theme

I see the directory is owned by root:nixbld and I have also added my current user to group nixbld but still no help .

Can someone help what is the root cause ?

Hi, I have the same problem. Where you able to resolve the issue?

For me, this works:

zplug = {
  enable = true;
  plugins = [
    { name = "dracula/zsh"; tags = ["as:theme"]; }
    { name = "plugins/colored-man-pages"; tags = [from:oh-my-zsh]; }
    { name = "plugins/command-not-found"; tags = [from:oh-my-zsh]; }
    { name = "plugins/copybuffer"; tags = [from:oh-my-zsh]; }
    { name = "plugins/copydir"; tags = [from:oh-my-zsh]; }
    { name = "plugins/copyfile"; tags = [from:oh-my-zsh]; }
  ];
};

Note that I had problems with having oh-my-zsh plugins when I was using zplug plugins also. Solution: put any oh-my-zsh plugins that you want to use in the zplug section, as shown above.

Thanks Joncol, I actually had a typo in the theme name