Skip to content

wrappers: support extraSpecialArgs #4009

@rkuklik

Description

@rkuklik

Hi.

I use nixvim both standalone and with home-manager. I have custom modules
written for standalone usage, but home-manager the options are namespaced under
programs.nixvim. Therefore, I import my modules like so:

{
  self, # flake reference
  ...
}:
{
  programs = {
    nixvim = {
      enable = true;
      imports = with self.nixvimModules; [
        module-name
      ];
    };
  };
}

However, module-name also takes self and other custom args, which fails with
infinite recursion.

I solve this by reimplementing the nixvim home-manager module to add my args as
extraSpecialArgs, which is suboptimal.

Is there a better solution than this? I think the best way to enable this would be
the approach home-manager takes under NixOS by having
home-manager.extraSpecialArgs option. I can submit a PR with this feature, if you
would be interested.

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions