40 lines
899 B
Nix
40 lines
899 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
{
|
|
options.modules.zsh = {
|
|
enable = mkOption { type = types.bool; default = false; };
|
|
};
|
|
|
|
config = mkIf config.modules.zsh.enable {
|
|
home.packages = with pkgs; [ zsh ];
|
|
home.file.".p10k.zsh".source = ./zsh/.p10k.zsh;
|
|
|
|
programs.zsh = {
|
|
enable = true;
|
|
|
|
autocd = true;
|
|
enableCompletion = true;
|
|
enableAutosuggestions = true;
|
|
|
|
prezto = {
|
|
enable = true;
|
|
prompt.theme = "powerlevel10k";
|
|
editor.keymap = "vi";
|
|
syntaxHighlighting.highlighters = [ "main" "brackets" "pattern" "line" "cursor" "root" ];
|
|
terminal = {
|
|
autoTitle = true;
|
|
multiplexerTitleFormat = "%s";
|
|
tabTitleFormat = "%s";
|
|
windowTitleFormat = "%s";
|
|
};
|
|
utility.safeOps = true;
|
|
};
|
|
|
|
initExtraFirst = ''
|
|
if [ -e "$HOME/.nix-profile/etc/profile.d/nix.sh" ]; then . "$HOME/.nix-profile/etc/profile.d/nix.sh"; fi
|
|
'';
|
|
};
|
|
};
|
|
}
|