Hello,
new Nix user here so please be patient with me
I have been using zsh with ohmyzsh and powerlevel10k for a while now and wanted to port it over to my new nixos setup, but all the guides and wiki entries and forum posts lead me to roadblocks I am confused about. In the sake of learning I will elaborate on the path I went down on and the questions that came up during that.
I started with the page on Zsh - NixOS Wiki and the first example config throws a big error, referencing while evaluating the error message for definitions for `programs.zsh.history', which is an option that does not exist
which is already confusing, but removing the history key worked. It was confusing because its clearly defined in Appendix A. Configuration Options and https://github.com/nix-community/home-manager/blob/6a94c1a59737783c282c4031555a289c28b961e4/modules/programs/zsh.nix#L358-L362
Then I was following conversations like Zsh zplug powerlevel10k ~/.zshrc is readonly and the same is happening for the plugins config option: error: The option `programs.zsh.plugins' does not exist. Definition values:
which again is clearly specified in Appendix A. Configuration Options and https://github.com/nix-community/home-manager/blob/6a94c1a59737783c282c4031555a289c28b961e4/modules/programs/zsh.nix#L420
I also found out that I don’t have to specify zsh as a package to be installed as long as I have programs.zsh.enable = true
set.
I was then looking at a few nixos config repositories like https://github.com/NobbZ/nixos-config/blob/c6bf918ef5609719e2627cee483072a3c35fc137/home/modules/programs/p10k/default.nix#L17-L28 and trying to apply their configs, but with the same results that the plugins config option is not set.
I was then wondering if that option is only valid if you have specific things imported or enabled? But none of the configs from people who graciously share them publicly seem to have a section of the packages they import, maybe they do that dynamically, but as a new user its hard to really follow this.
So now I am confused why these config options are not available when they are clearly documented, and if I am missing something that I do different then everyone else?
I just install packages with
environment.systemPackages = with pkgs; [
[...trimmed]
zsh
zsh-powerlevel10k
];
but none of the public config repos I found do things this way, making it hard to reproduce what they are doing.
Any help, links to documentation and education is much appreciated!
Regards,
Marvin