blob: 0f10e7220cb222557605498dafaf80e88ae14eb6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
{ config, lib, pkgs, ... }:
{
options.tools.zsh = {
enable = lib.mkEnableOption "Enables zsh.";
};
config = lib.mkIf config.tools.zsh.enable {
programs.zsh.enable = true;
programs.zsh.dotDir = ".config/zsh";
programs.zsh.history.path = "${config.xdg.cacheHome}/zsh/history";
programs.zsh.initContent = ''
${if config.tools.fzf.enable then
"eval \"$(fzf --zsh)\""
else ""}
${builtins.readFile ./zshrc}
${if config.scripts.enable then
"export PATH=${config.home.homeDirectory}/scripts:$PATH"
else ""}
'';
programs.kitty.settings.shell = lib.mkIf config.tools.kitty.enable "zsh";
programs.zsh.shellAliases."nnn" = lib.mkIf config.tools.nnn.enable "nnn -H -d";
# programs.zsh.shellAliases."ls" = lib.mkIf config.tools.lsd.enable "lsd";
};
}
|