blob: ac147e3cf17149e6219aecc4d45276d4f905bb17 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
{ config, lib, pkgs, ... }:
{
options.tools.zsh = {
enable = lib.mkEnableOption "Enables zsh.";
};
config = lib.mkIf config.tools.zsh.enable {
programs.zsh = {
enable = true;
dotDir = "${config.xdg.configHome}/zsh";
history.path = "${config.xdg.cacheHome}/zsh/history";
initContent = ''
${if config.tools.fzf.enable then
"eval \"$(fzf --zsh)\""
else ""}
${builtins.readFile ./zshrc}
'';
};
home.sessionVariables.SHELL = "${pkgs.zsh}/bin/zsh";
};
}
|