mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
modules: refactor module bootstrapping
Let's simplify things by defining all modules in `./plugins`, `./modules` and `./wrappers/modules`. Instead of currying `pkgs` into a bootstrapping module, we can require `defaultPkgs` be provided as a special arg. This refactor allows us to completely remove `flake-modules/modules.nix`!
This commit is contained in:
parent
3d96960348
commit
d2afb176ff
16 changed files with 129 additions and 159 deletions
|
@ -1,8 +1,4 @@
|
|||
{
|
||||
modules,
|
||||
self,
|
||||
getHelpers,
|
||||
}:
|
||||
{ self, getHelpers }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
|
@ -20,7 +16,7 @@ let
|
|||
types
|
||||
;
|
||||
helpers = getHelpers pkgs false;
|
||||
shared = import ./_shared.nix { inherit modules helpers; } args;
|
||||
shared = import ./_shared.nix helpers args;
|
||||
cfg = config.programs.nixvim;
|
||||
files = shared.configFiles // {
|
||||
"nvim/sysinit.lua".text = cfg.initContent;
|
||||
|
@ -34,6 +30,7 @@ in
|
|||
shorthandOnlyDefinesConfig = true;
|
||||
specialArgs = {
|
||||
nixosConfig = config;
|
||||
defaultPkgs = pkgs;
|
||||
inherit helpers;
|
||||
};
|
||||
modules = [ ./modules/nixos.nix ] ++ shared.topLevelModules;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue