Files
nixos/Droidnix/generated/system/applications/terminal_shell/zsh.nix
T
2026-03-07 23:27:49 +01:00

55 lines
1.2 KiB
Nix

{
config,
pkgs,
lib,
user,
...
}:
let
zshConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/zsh";
in
{
home-manager.users.${user.username} = {
programs.zsh = {
enable = true;
enableCompletion = true;
dotDir = zshConfigDir;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
oh-my-zsh = {
enable = true;
theme = "";
plugins = [
"git"
"sudo"
"extract"
"colored-man-pages"
"command-not-found"
"history"
"docker"
"kubectl"
];
};
};
# Single source of truth for .zshrc
xdg.configFile."zsh/.zshrc".text = lib.concatStringsSep "\n" [
"# Zsh options"
"setopt AUTO_CD"
"setopt CORRECT"
"setopt INTERACTIVE_COMMENTS"
""
"# Oh-My-Zsh"
"export ZSH=\"${zshConfigDir}\""
"source \"${pkgs.zsh}/share/zsh/functions/Newuser/zsh-newuser-install\""
"source \"${zshConfigDir}/oh-my-zsh.sh\""
""
"# Starship"
"eval \"$(starship init zsh)\""
""
"# User customizations (if any)"
"source \"${zshConfigDir}/custom.zsh\" # Optional: for user-specific additions"
];
};
}