Oh my zsh in nix develop

 programs.zsh = {
   enable = true;
   autosuggestions.enable = true;
   syntaxHighlighting.enable = true;
   zsh-autoenv.enable = true;
   ohMyZsh = {
        enable = true;
        theme = "robbyrussell";
        plugins = [
          "zoxide"
          "git"
          "sudo"
          "fzf"
        ];
   };
this is in my configuration.nix 

```nix
{
  description = "trying rust as a flake";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
  };

  outputs = { self, nixpkgs }: 
    let
      system ="x86_64-linux";
      pkgs = nixpkgs.legacyPackages.x86_64-linux;
    in
    {
      devShells = {
        ${system}.default = pkgs.mkShell {
          buildInputs = with pkgs; [
            rustc
            rust-analyzer
            cargo
            git
            jujutsu
            helix
            zsh
          ];

          NIX_SHELL_PRESERVE_PROMPT = 1;
        };
      };
    };
} 

```nix
{
  description = "trying rust as a flake";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
  };

  outputs = { self, nixpkgs }: 
    let
      system ="x86_64-linux";
      pkgs = nixpkgs.legacyPackages.x86_64-linux;
    in
    {
      devShells = {
        ${system}.default = pkgs.mkShell {
          buildInputs = with pkgs; [
            rustc
            rust-analyzer
            cargo
            git
            jujutsu
            helix
            zsh
          ];
      };
      };
    };
} 

i managed to use zsh in the flake with nix develop -c zsh
i do not understand how to import the omz conf in this shell

I guess you’re using oh my zsh as your system shell already and would like to use this in the context of the flake, correct?

One nice thing to use is Automatic environment activation with direnv — nix.dev documentation.
What it basically does is: if there is a specific file in the directory it will load the devShell and execute it within your zsh. What you gain is, all things specified as buildInputs (see Difference between buildInputs and packages in mkShell) in your PATH, right at your fingertips in your known shell.

the thing is i do not have a .zshrc in my home because i set zsh up in the configuration.nix file so idk how to do this. maybe is it better to set it up with the conventional way?

Instead of nix develop, try source <(nix print-dev-env) in the directory of the flake.

Is this you want to achieve?