summaryrefslogtreecommitdiff
path: root/user-profiles/zsh/default.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2021-01-03 00:55:29 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2021-01-03 16:21:34 +0100
commit4a3d2a8ddaf4e546df360656bc54b2947bdb890b (patch)
treef571511e0b74fbd7e78f7e10966a8d6d5d400241 /user-profiles/zsh/default.nix
parent3b5ab82fa714a0d483a7b90d60f9f7c857646e33 (diff)
downloadnixos-4a3d2a8ddaf4e546df360656bc54b2947bdb890b.tar
nixos-4a3d2a8ddaf4e546df360656bc54b2947bdb890b.tar.gz
nixos-4a3d2a8ddaf4e546df360656bc54b2947bdb890b.tar.bz2
nixos-4a3d2a8ddaf4e546df360656bc54b2947bdb890b.tar.xz
nixos-4a3d2a8ddaf4e546df360656bc54b2947bdb890b.zip
gkleen@sif: import
Diffstat (limited to 'user-profiles/zsh/default.nix')
-rw-r--r--user-profiles/zsh/default.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/user-profiles/zsh/default.nix b/user-profiles/zsh/default.nix
new file mode 100644
index 00000000..58fa0376
--- /dev/null
+++ b/user-profiles/zsh/default.nix
@@ -0,0 +1,30 @@
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 "${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
25 '';
26 };
27
28 home.file.${p10kZsh}.source = ./p10k.zsh;
29 };
30}