41 lines
829 B
Nix
41 lines
829 B
Nix
{ config, pkgs, lib, flakeRoot, ... }:
|
|
|
|
let
|
|
generatedZsh = "${flakeRoot}/generated/.config/zsh/.zshrc";
|
|
in
|
|
{
|
|
programs.zsh = {
|
|
enable = true;
|
|
enableCompletion = true;
|
|
|
|
ohMyZsh = {
|
|
enable = true;
|
|
theme = "";
|
|
plugins = [
|
|
"git"
|
|
"sudo"
|
|
"extract"
|
|
"colored-man-pages"
|
|
"command-not-found"
|
|
"history"
|
|
"docker"
|
|
"kubectl"
|
|
];
|
|
};
|
|
|
|
autosuggestions.enable = true;
|
|
syntaxHighlighting.enable = true;
|
|
|
|
# Instead of dotDir, just set ZDOTDIR and source generated file
|
|
extraConfig = ''
|
|
# Tell Zsh to use ~/.config/zsh as main config dir
|
|
export ZDOTDIR="$HOME/.config/zsh"
|
|
|
|
# Source generated .zshrc if it exists
|
|
if [ -f "${generatedZsh}" ]; then
|
|
source "${generatedZsh}"
|
|
fi
|
|
'';
|
|
};
|
|
}
|