I am just curious, is anyone using ZIM for their zsh config? I am currently using it, and love it. But I have not figured out how to use it with NixOS.
Thanks for the direction.
I am just curious, is anyone using ZIM for their zsh config? I am currently using it, and love it. But I have not figured out how to use it with NixOS.
Thanks for the direction.
The shell-plugin package managers aren’t the best way of managing shell plugins with nix, since nix can’t see what this extra tool is doing at all. It fails to provide the reproducibility you get with nix, which is sad.
Personally, I use home-manager’s zsh plugin management: programs.zsh.plugins
. No “frameworks” required!
The zim “features” are third party packages, by the way, which you can enable with home-manager too: programs.zsh.enableAutosuggestions
, programs.zsh.enableSyntaxHighlighting
If you’d like to use any of zim’s actual module definitions, home-manager already supports prezto, oh-my-zsh and zplug, so you can look into that to see how you’d add support. I’m not sure how many zim-specific features exist, though, it seems to primarily be a package manager, so programs.zsh.plugins
may be able to just run most of them out of the box.
Ah, got it. So if I like the OOTB configuration (plugins, etc), I will need to port the experience over. Got it.
Thanks!
well, you can use any zsh configuration framework with nixos. Just wrap your zshrc and the code for bootstrapping zim inside the nix config:
In your system-wide configuration:
programs.zsh = {
enable = true;
enableGlobalCompInit = false;
};
In your home manager config:
programs.zsh = {
enable = true;
enableCompletion = true;
# don't call compinit as zimfw will call it
completionInit = "";
initExtraFirst = ''"
# you configuration for zshrc goes here,
# including the code for bootstrapping zim
""
You can, however:
The shell-plugin package managers aren’t the best way of managing shell plugins with nix, since nix can’t see what this extra tool is doing at all. It fails to provide the reproducibility you get with nix, which is sad.
Given shell plugins are as simple as they are, I don’t see much point in ditching declarative config just to avoid having to learn which files to put where. Everything zim does can be done with a few clever fetchFromGithub
s.
But yeah, if you’re fine with your zsh config not being managed by nix, you can do that.