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:
Matt Sturgeon 2024-07-08 05:51:51 +01:00
parent cfa44bbb66
commit 1b7efacdf4
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
7 changed files with 23 additions and 37 deletions

View file

@ -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) (