diff options
author | Minijackson <minijackson@riseup.net> | 2021-07-09 11:48:54 +0200 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2021-07-09 11:49:04 +0200 |
commit | 1379ece72106f5e15856e72ce9d40ebc938d15d3 (patch) | |
tree | 3937952c9d066d58ae320207b4c06779d133c0f7 /common/commandline | |
parent | 70078aeaea47cdd994cce98cb9564e9a1ac38097 (diff) | |
download | nixos-config-reborn-1379ece72106f5e15856e72ce9d40ebc938d15d3.tar.gz nixos-config-reborn-1379ece72106f5e15856e72ce9d40ebc938d15d3.zip |
zsh: add shmart-prompt-dir
Diffstat (limited to 'common/commandline')
-rw-r--r-- | common/commandline/zsh.nix | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/common/commandline/zsh.nix b/common/commandline/zsh.nix index 56bdbac..2fc8c87 100644 --- a/common/commandline/zsh.nix +++ b/common/commandline/zsh.nix | |||
@@ -21,6 +21,9 @@ in | |||
21 | local dim_fg_escape_code="${fgEscapeCode config.theme.colors.dimForeground}" | 21 | local dim_fg_escape_code="${fgEscapeCode config.theme.colors.dimForeground}" |
22 | 22 | ||
23 | ${builtins.readFile ../../dotfiles/zshrc} | 23 | ${builtins.readFile ../../dotfiles/zshrc} |
24 | |||
25 | autoload -Uz shmart-prompt-dir | ||
26 | zstyle -e ':prompt:grml*:*:items:path' token shmart-prompt-dir | ||
24 | } | 27 | } |
25 | 28 | ||
26 | # Grml's ZSH config overrides less variables | 29 | # Grml's ZSH config overrides less variables |
@@ -57,17 +60,27 @@ in | |||
57 | 60 | ||
58 | users.defaultUserShell = pkgs.zsh; | 61 | users.defaultUserShell = pkgs.zsh; |
59 | 62 | ||
60 | home-manager.users.minijackson = { ... }: { | 63 | home-manager.users = |
61 | # Allows zsh config from home-manager | 64 | let |
62 | programs.zsh = { | 65 | config = { |
63 | enable = true; | 66 | enable = true; |
64 | # Completion is already handled by the GRML conf | 67 | # Completion is already handled by the GRML conf |
65 | enableCompletion = false; | 68 | enableCompletion = false; |
66 | }; | ||
67 | }; | ||
68 | 69 | ||
69 | home-manager.users.root = { ... }: { | 70 | plugins = [{ |
70 | programs.zsh = | 71 | name = "shmart-prompt-dir"; |
71 | lib.mkDefault config.home-manager.users.minijackson.programs.zsh; | 72 | src = inputs.shmart-prompt-dir; |
72 | }; | 73 | file = "none"; |
74 | }]; | ||
75 | }; | ||
76 | in | ||
77 | { | ||
78 | minijackson = { ... }: { | ||
79 | # Allows zsh config from home-manager | ||
80 | programs.zsh = config; | ||
81 | }; | ||
82 | root = { ... }: { | ||
83 | programs.zsh = config; | ||
84 | }; | ||
85 | }; | ||
73 | } | 86 | } |