summaryrefslogtreecommitdiff
path: root/user-profiles/zsh/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'user-profiles/zsh/default.nix')
-rw-r--r--user-profiles/zsh/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/user-profiles/zsh/default.nix b/user-profiles/zsh/default.nix
new file mode 100644
index 00000000..88873c1a
--- /dev/null
+++ b/user-profiles/zsh/default.nix
@@ -0,0 +1,31 @@
1{ userName, pkgs, customUtils, lib, config, ... }:
2let
3 dotDir = ".config/zsh";
4 p10kZsh = "${dotDir}/.p10k.zsh";
5 cfg = config.home-manager.users.${userName};
6in {
7 home-manager.users.${userName} = {
8 programs.zsh = {
9 inherit dotDir;
10 enable = true;
11 autocd = true;
12 enableCompletion = true;
13
14 plugins = [
15 { name = "powerlevel10k";
16 file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
17 src = pkgs.zsh-powerlevel10k;
18 }
19 ];
20 initExtraBeforeCompInit = ''
21 source "${cfg.home.homeDirectory}/${p10kZsh}"
22 '';
23 initExtra = lib.mkAfter ''
24 source ${./zshrc}
25 source "${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
26 '';
27 };
28
29 home.file.${p10kZsh}.source = ./p10k.zsh;
30 };
31}