Files
nixos/Droidnix/generated/modules/terminals/zsh.nix
T
2026-03-22 15:31:44 +00:00

48 lines
1.0 KiB
Nix

{ config, pkgs, lib, ... }:
let
isHM = config.home-manager.useHomeManager or false;
in
{
###########################
# NIXOS SYSTEM CONFIG
###########################
programs.zsh = {
enable = true;
enableCompletion = true;
ohMyZsh = {
enable = true;
theme = "";
plugins = [
"git"
"sudo"
"extract"
"colored-man-pages"
"command-not-found"
"history"
"docker"
"kubectl"
];
};
};
###########################
# HOME-MANAGER CONFIG (only if HM is active)
###########################
home.file."zsh.nix".text = lib.mkIf isHM ''
# Only applied in home-manager context
# Set Zsh dotDir, autosuggestions, syntax highlighting, autocd
export ZDOTDIR="${config.xdg.configHome}/zsh"
# Optional: source your plugins/config here
'';
home.programs.zsh = lib.mkIf isHM {
autocd = true;
dotDir = "${config.xdg.configHome}/zsh";
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
};
}