nix_config/home/modules/zsh/default.nix

35 lines
715 B
Nix
Raw Normal View History

2024-11-29 07:44:04 +01:00
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.local.services.zsh;
in {
2024-11-29 19:23:51 +01:00
options.local.services.zsh = {
enable = mkEnableOption "zsh settings";
prompt = mkOption {
type = types.str;
description = "prompt for your terminal";
example = literalExpression "%B[%~] \${vcs_info_msg_0_}%b";
};
};
2024-11-29 07:44:04 +01:00
config = mkIf cfg.enable {
programs.zsh = {
enable = true;
syntaxHighlighting.enable = true;
2024-12-02 04:58:38 +01:00
autosuggestion.enable = true;
2024-12-02 19:22:23 +01:00
history = {
append = true;
expireDuplicatesFirst = true;
ignoreAllDups = true;
ignoreSpace = true;
};
2024-11-29 19:23:51 +01:00
initExtra = import ./zshrc.nix {inherit config lib pkgs;};
2024-11-29 07:44:04 +01:00
};
};
}