-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdev-shell.nix
48 lines (39 loc) · 1.03 KB
/
dev-shell.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{ mkShell, wezterm, wez-per-project-workspace, writeTextFile }:
let
config = writeTextFile {
name = "wez-per-project-workspace-dev-shell-config.lua";
text = ''
package.path = package.path .. ";${wez-per-project-workspace}/?.lua"
local wezterm = require("wezterm")
local config = {}
if wezterm.config_builder then
config = wezterm.config_builder()
end
config.leader = { key = "b", mods = "CTRL" }
config.keys = {
{
key = "g",
mods = "LEADER",
action = require("plugin").action.ProjectWorkspaceSelect({
base_dirs = {
{
path = "${./examples}",
min_depth = 1,
max_depth = 2,
},
},
rooters = { ".gitkeep" },
}),
}
}
return config
'';
};
in
mkShell {
name = "wez-per-project-workspace-dev-shell";
packages = [ wezterm ];
shellHook = ''
alias wezterm="wezterm --config-file ${config}"
'';
}