summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMinijackson <minijackson@riseup.net>2021-07-09 11:48:54 +0200
committerMinijackson <minijackson@riseup.net>2021-07-09 11:49:04 +0200
commit1379ece72106f5e15856e72ce9d40ebc938d15d3 (patch)
tree3937952c9d066d58ae320207b4c06779d133c0f7
parent70078aeaea47cdd994cce98cb9564e9a1ac38097 (diff)
downloadnixos-config-reborn-1379ece72106f5e15856e72ce9d40ebc938d15d3.tar.gz
nixos-config-reborn-1379ece72106f5e15856e72ce9d40ebc938d15d3.zip
zsh: add shmart-prompt-dir
-rw-r--r--common/commandline/zsh.nix37
-rw-r--r--flake.lock19
-rw-r--r--flake.nix4
3 files changed, 47 insertions, 13 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}
diff --git a/flake.lock b/flake.lock
index d9544bb..de1e3c0 100644
--- a/flake.lock
+++ b/flake.lock
@@ -106,7 +106,24 @@
106 "musnix": "musnix", 106 "musnix": "musnix",
107 "nixpkgs": "nixpkgs", 107 "nixpkgs": "nixpkgs",
108 "nixpkgs-unstable": "nixpkgs-unstable", 108 "nixpkgs-unstable": "nixpkgs-unstable",
109 "nur": "nur" 109 "nur": "nur",
110 "shmart-prompt-dir": "shmart-prompt-dir"
111 }
112 },
113 "shmart-prompt-dir": {
114 "flake": false,
115 "locked": {
116 "lastModified": 1625823847,
117 "narHash": "sha256-aPI9XAX1/KXOHZ/ADxa4ChI0BQdiWfSH57CE27EFOyA=",
118 "owner": "minijackson",
119 "repo": "shmart-prompt-dir",
120 "rev": "5fdd49c8b901b6861879e61cca7244af0405bb8e",
121 "type": "github"
122 },
123 "original": {
124 "owner": "minijackson",
125 "repo": "shmart-prompt-dir",
126 "type": "github"
110 } 127 }
111 } 128 }
112 }, 129 },
diff --git a/flake.nix b/flake.nix
index 6d014e9..d25a4a4 100644
--- a/flake.nix
+++ b/flake.nix
@@ -13,6 +13,10 @@
13 url = "github:musnix/musnix"; 13 url = "github:musnix/musnix";
14 flake = false; 14 flake = false;
15 }; 15 };
16 inputs.shmart-prompt-dir = {
17 url = "github:minijackson/shmart-prompt-dir";
18 flake = false;
19 };
16 20
17 outputs = inputs @ { self, nixpkgs, home-manager, ... }: { 21 outputs = inputs @ { self, nixpkgs, home-manager, ... }: {
18 22