summaryrefslogtreecommitdiffstats
path: root/common/vim.nix
diff options
context:
space:
mode:
authorMinijackson <minijackson@riseup.net>2021-09-15 10:37:33 +0200
committerMinijackson <minijackson@riseup.net>2021-09-15 10:37:33 +0200
commitcf4087bef2a00458ccab7b6c6c2e0c2bd30a85c9 (patch)
tree2af29d859ea263e2847681cc495e05371ee73e48 /common/vim.nix
parentf15ba03660823461bdab382f61bbc9ff74fe221b (diff)
downloadnixos-config-reborn-cf4087bef2a00458ccab7b6c6c2e0c2bd30a85c9.tar.gz
nixos-config-reborn-cf4087bef2a00458ccab7b6c6c2e0c2bd30a85c9.zip
vim: fix build due to dependency on pname
Diffstat (limited to 'common/vim.nix')
-rw-r--r--common/vim.nix21
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