Skip to content

Commit

Permalink
flake: add nixvimModules flake-parts module
Browse files Browse the repository at this point in the history
  • Loading branch information
MattSturgeon committed Jan 19, 2025
1 parent 5426c9d commit 8fb2fe2
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions flake/flake-modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
let
# Modules for the flakeModules output and the default module
defaultModules = {
nixvimModules = ./nixvimModules.nix;
nixvimConfigurations = ./nixvimConfigurations.nix;
};

Expand Down
27 changes: 27 additions & 0 deletions flake/flake-modules/nixvimModules.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
lib,
flake-parts-lib,
moduleLocation,
...
}:
{
options = {
flake = flake-parts-lib.mkSubmoduleOptions {
nixvimModules = lib.mkOption {
type = with lib.types; lazyAttrsOf deferredModule;
default = { };
apply = lib.mapAttrs (
name: module: {
_file = "${toString moduleLocation}#nixvimModules.${name}";
imports = [ module ];
}
);
description = ''
Nixvim modules.
You may use this for reusable pieces of configuration, utility modules, etc.
'';
};
};
};
}

0 comments on commit 8fb2fe2

Please sign in to comment.