2024-11-06 22:26:21 +01:00
|
|
|
{ inputs, lib, ... }:
|
2024-10-04 23:23:30 +02:00
|
|
|
{
|
|
|
|
flake.overlays.nixvim = inputs.nixvim.overlays.default;
|
|
|
|
|
|
|
|
perSystem =
|
|
|
|
{ pkgs, system, ... }:
|
2024-10-05 22:37:58 +02:00
|
|
|
let
|
|
|
|
nixvimLib = inputs.nixvim.lib.${system};
|
|
|
|
nixvim = inputs.nixvim.legacyPackages.${system};
|
2024-11-06 22:42:16 +01:00
|
|
|
testNvimModule = nixvimLib.check.mkTestDerivationFromNixvimModule;
|
|
|
|
nvimModule = extraConfig: {
|
2024-11-06 22:33:30 +01:00
|
|
|
inherit pkgs;
|
|
|
|
extraSpecialArgs = {
|
|
|
|
inherit (inputs) unstable;
|
|
|
|
inherit system;
|
|
|
|
};
|
|
|
|
module = {
|
|
|
|
imports = [ (import ../nvim/standalone.nix { standalone = true; }) ];
|
2024-11-06 22:42:16 +01:00
|
|
|
config = extraConfig;
|
2024-11-06 22:33:30 +01:00
|
|
|
};
|
|
|
|
};
|
2024-11-06 22:42:16 +01:00
|
|
|
moduleDev = nvimModule { };
|
|
|
|
moduleHeadless = nvimModule { jhome.nvim.dev.enable = false; };
|
|
|
|
moduleNoLsp = nvimModule { jhome.nvim.dev.bundleLSPs = false; };
|
|
|
|
moduleNoTSGrammars = nvimModule { jhome.nvim.dev.bundleGrammars = false; };
|
|
|
|
moduleNoBundledBins = nvimModule {
|
|
|
|
jhome.nvim.dev = {
|
|
|
|
bundleLSPs = false;
|
|
|
|
bundleGrammars = false;
|
2024-11-06 22:33:30 +01:00
|
|
|
};
|
|
|
|
};
|
2024-10-05 22:37:58 +02:00
|
|
|
in
|
|
|
|
{
|
|
|
|
# Check standalone nvim build
|
2024-11-06 22:33:30 +01:00
|
|
|
checks = {
|
2024-11-06 22:42:16 +01:00
|
|
|
nvimDev = testNvimModule moduleDev;
|
|
|
|
nvimHeadless = testNvimModule moduleHeadless;
|
|
|
|
nvimNoLsp = testNvimModule moduleNoLsp;
|
|
|
|
nvimNoTSGrammars = testNvimModule moduleNoTSGrammars;
|
|
|
|
nvimNoBundledBins = testNvimModule moduleNoBundledBins;
|
2024-11-06 22:33:30 +01:00
|
|
|
};
|
2024-10-04 23:23:30 +02:00
|
|
|
|
|
|
|
# Nvim standalone module
|
2024-11-06 22:42:16 +01:00
|
|
|
packages = {
|
|
|
|
nvim = nixvim.makeNixvimWithModule moduleDev;
|
|
|
|
# Smaller derivations
|
|
|
|
nvim-small = nixvim.makeNixvimWithModule moduleNoBundledBins;
|
|
|
|
nvim-no-ts = nixvim.makeNixvimWithModule moduleNoTSGrammars;
|
|
|
|
nvim-no-lsps = nixvim.makeNixvimWithModule moduleNoLsp;
|
|
|
|
};
|
2024-10-04 23:23:30 +02:00
|
|
|
};
|
|
|
|
}
|