diff options
Diffstat (limited to 'common/vim.nix')
-rw-r--r-- | common/vim.nix | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/common/vim.nix b/common/vim.nix index 42e3c45..2a70864 100644 --- a/common/vim.nix +++ b/common/vim.nix | |||
@@ -11,9 +11,9 @@ let | |||
11 | 11 | ||
12 | cfg = config.vim; | 12 | cfg = config.vim; |
13 | 13 | ||
14 | myConfigPackage = with lib; | 14 | myConfigPackage = |
15 | pkgs.writeTextDir | 15 | with lib; |
16 | "share/vim-plugins/myConfig/lua/myConfig.lua" | 16 | let config = |
17 | '' | 17 | '' |
18 | -- Autogenerated variables from the NixOS configuration | 18 | -- Autogenerated variables from the NixOS configuration |
19 | 19 | ||
@@ -31,6 +31,19 @@ let | |||
31 | 31 | ||
32 | ${cfg.luaConfig} | 32 | ${cfg.luaConfig} |
33 | ''; | 33 | ''; |
34 | in | ||
35 | pkgs.runCommand | ||
36 | "myConfig" | ||
37 | { | ||
38 | pname = "myConfig"; | ||
39 | inherit config; | ||
40 | passAsFile = [ "config" ]; | ||
41 | runLocal = true; | ||
42 | } | ||
43 | '' | ||
44 | mkdir -p "$out/lua" | ||
45 | mv "$configPath" "$out/lua/myConfig.lua" | ||
46 | ''; | ||
34 | 47 | ||
35 | myNeovim = wrapNeovim neovim-unwrapped { | 48 | myNeovim = wrapNeovim neovim-unwrapped { |
36 | configure = { | 49 | configure = { |
@@ -108,7 +121,7 @@ in | |||
108 | 121 | ||
109 | variables = mkOption { | 122 | variables = mkOption { |
110 | type = types.attrsOf luaFormat.type; | 123 | type = types.attrsOf luaFormat.type; |
111 | default = {}; | 124 | default = { }; |
112 | description = "Extra global variables to add at the beginning of the vim configuration."; | 125 | description = "Extra global variables to add at the beginning of the vim configuration."; |
113 | }; | 126 | }; |
114 | 127 | ||