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

52 lines
1.1 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, consolidated .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 (if used)"
"eval \"$(starship init zsh)\""
];
};
}