mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-14 11:14:36 +02:00
wrappers: bootstrap "helpers" directly
We don't need to pass a `getHelpers` function in, since we can just import `../lib/helpers.nix`.
This commit is contained in:
parent
cfa44bbb66
commit
1b7efacdf4
7 changed files with 23 additions and 37 deletions
|
@ -1,6 +1,4 @@
|
|||
{
|
||||
# Our helpers
|
||||
helpers,
|
||||
# Option path where extraFiles should go
|
||||
filesOpt ? null,
|
||||
# Filepath prefix to apply to extraFiles
|
||||
|
@ -9,7 +7,12 @@
|
|||
# Is prefixed with `filesPrefix`
|
||||
initName ? "init.lua",
|
||||
}:
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib)
|
||||
isAttrs
|
||||
|
@ -39,7 +42,7 @@ in
|
|||
|
||||
config = mkMerge [
|
||||
# Make our lib available to the host modules
|
||||
{ nixvim.helpers = lib.mkDefault helpers; }
|
||||
{ nixvim.helpers = lib.mkDefault (import ../lib/helpers.nix { inherit pkgs lib; }); }
|
||||
# Propagate extraFiles to the host modules
|
||||
(optionalAttrs (filesOpt != null) (
|
||||
mkIf (!cfg.wrapRc) (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue