So I’m trying to make a development environment that’s easily reproducible (staying away from home-manager
currently to understand Nix better). After enough searching around I figured out how to make a few custom derivations, use buildEnv
for package sets, and use ~/.config/nixpkgs/config.nix
to do overrides. I’m working now to setup zsh
and oh-my-zsh
which have a ton of configuration options, but the only documentation I can find seems to suggest adding them to configuration.nix
, which is a NixOS option I can’t use.
Currently my code looks something like this:
let
pkgs = import <nixpkgs> {};
in {
allowUnfree = true;
programs = {
zsh = {
enable = true;
promptInit = "source ${pkgs.zsh-powerlevel9k}/share/zsh-powerlevel9k/powerlevel9k.zsh-theme";
ohMyZsh = {
enable = true;
plugins = ["autojump"];
theme = "powerlevel9k/powerlevel9k";
};
};
};
packageOverrides = pkgs: with pkgs; rec {
all = buildEnv {
name = "all";
paths = with pkgs; [
tmuxinator
zsh
oh-my-zsh
autojump
...
];
};
};
}
My understanding so far is that within ~/.config/nixpkgs/config.nix
, there should be a single config set which contains things like the overrides
function and corresponds to documentation examples of config.programs.zsh.enable
, etc. However, nothing I write in that programs
section affects or causes a different ouput of any of my programs.
What am I missing? How can I affect the configuration options listed here (nixpkgs/zsh.nix at master · NixOS/nixpkgs · GitHub)?