I use Home manager for this:
home.packages = with pkgs; [ zsh-powerlevel10k meslo-lgs-nf ];
programs.zsh.enable = true;
home.file.".p10k.zsh".text = builtins.readFile ./p10k.zsh;
The whole (very messy ^^') configuration can be found here: https://github.com/mickours/nixos-config/blob/6694179962931efc54e802a61c7bff5b51ff8329/config/home.nix