mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
42 lines
928 B
Nix
42 lines
928 B
Nix
{ pkgs, lib, config, ... }:
|
|
let
|
|
cfg = config.mods.terminal;
|
|
|
|
aliases = { la = "ls -lah"; };
|
|
|
|
in {
|
|
options.mods.terminal = { zsh.enable = lib.mkEnableOption "enables zsh"; };
|
|
|
|
config = {
|
|
programs.starship.enable = true;
|
|
|
|
programs.zsh = lib.mkIf cfg.zsh.enable {
|
|
enable = true;
|
|
enableCompletion = true;
|
|
autosuggestion.enable = true;
|
|
syntaxHighlighting.enable = true;
|
|
|
|
history = {
|
|
save = 2097152;
|
|
size = 2097152;
|
|
expireDuplicatesFirst = true;
|
|
ignoreDups = true;
|
|
ignoreSpace = true;
|
|
path = "${config.xdg.dataHome}/zsh/history";
|
|
};
|
|
|
|
initContent = ''
|
|
autoload -U compinit
|
|
setopt no_auto_remove_slash
|
|
'';
|
|
|
|
shellAliases = aliases;
|
|
|
|
plugins = with pkgs; [{
|
|
name = "zsh-vi-mode";
|
|
src = zsh-vi-mode;
|
|
file = "share/zsh-vi-mode/zsh-vi-mode.plugin.zsh";
|
|
}];
|
|
};
|
|
};
|
|
}
|