mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-08 19:57:15 +00:00
modules: move local functions to extended library
This commit is contained in:
parent
b4b8a845f1
commit
f70238d539
6 changed files with 63 additions and 527 deletions
15
lib/build.nix
Normal file
15
lib/build.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
# TODO: give those section indicators
|
||||
# maybe using mkSection?
|
||||
wrapLuaConfig = {
|
||||
luaConfigBefore,
|
||||
luaConfig,
|
||||
luaConfigAfter,
|
||||
}: ''
|
||||
lua << EOF
|
||||
${luaConfigBefore}
|
||||
${luaConfig}
|
||||
${luaConfigAfter}
|
||||
EOF
|
||||
'';
|
||||
}
|
||||
|
|
@ -126,4 +126,10 @@ in {
|
|||
else abort ("Dependency cycle in ${name}: " + toJSON sortedDag);
|
||||
in
|
||||
result;
|
||||
|
||||
# Create a section in the final output
|
||||
mkSection = section: ''
|
||||
-- SECTION: ${section.name}
|
||||
${section.data}
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue