mirror of
https://github.com/nix-community/nixvim.git
synced 2025-11-21 17:59:41 +01:00
Rename `lib/default.nix` to `lib/top-level.nix` to make its purpose explicit and discourage importing it directly. Consumers should obtain the extended lib via flake outputs or the overlay, rather than bypassing the required bootstrapping logic. This clarifies the file's role and avoids suggesting it is the primary entrypoint to Nixvim's lib subsection.
42 lines
1,006 B
Nix
42 lines
1,006 B
Nix
{
|
|
self,
|
|
config,
|
|
lib,
|
|
withSystem,
|
|
...
|
|
}:
|
|
{
|
|
# Expose lib as a flake-parts module arg
|
|
_module.args = {
|
|
helpers = self.lib.nixvim;
|
|
};
|
|
|
|
# Public `lib` flake output
|
|
flake.lib = {
|
|
nixvim = lib.makeOverridable (import ../lib/top-level.nix) {
|
|
inherit lib;
|
|
flake = self;
|
|
};
|
|
overlay = lib.makeOverridable (import ../lib/overlay.nix) {
|
|
flake = self;
|
|
};
|
|
# Top-top-level aliases
|
|
inherit (self.lib.nixvim)
|
|
evalNixvim
|
|
;
|
|
}
|
|
// lib.genAttrs config.systems (
|
|
lib.flip withSystem (
|
|
{ pkgs, system, ... }:
|
|
{
|
|
# NOTE: this is the publicly documented flake output we've had for a while
|
|
check = pkgs.callPackage ../lib/tests.nix {
|
|
inherit lib self system;
|
|
};
|
|
|
|
# NOTE: no longer needs to be per-system
|
|
helpers = lib.warn "nixvim: `<nixvim>.lib.${system}.helpers` has been moved to `<nixvim>.lib.nixvim` and no longer depends on a specific system" self.lib.nixvim;
|
|
}
|
|
)
|
|
);
|
|
}
|