Skip to content

"The option `flake.wrappers.neovim.addFlag' does not exist" error when using .install with flake-parts #501

@rishyramen

Description

@rishyramen
error: The option `flake.wrappers.neovim.addFlag' does not exist. Definition values:
- In `/nix/store/ksqg3ja7xwak87yhyylm3qb6mpps5pl6-source/terminal/neovim.nix': [ ]
- Did you mean `flake.wrappers.neovim.apply', `flake.wrappers.neovim.drv' or `flake.wrappers.neovim.eval'?

I receive the above error when using .install on the wrapper module. I don't encounter this issue when using getInstallModule though the documentation seems to suggest this shouldn't be necessary if I'm using the wrapper flake modules? Below is my neovim flake-parts module.

{
  config,
  lib,
  self,
  inputs,
  ...
}:
let
  inherit (inputs) nixpkgs wrappers;
  module = nixpkgs.lib.modules.importApply ./module.nix {
    inherit inputs;
    flake-path = "${self}";
  };
  wrapper = wrappers.lib.evalModule module;
in
{
  imports = [ wrappers.flakeModules.wrappers ];

  flake = {
    wrappers.neovim = wrapper.config;
    overlays.neovim = final: prev: { neovim = wrapper.config.wrap { pkgs = final; }; };
    homeModules.neovim =
      { config, lib, ... }:
      let
        inherit (config.home) dotfilesDir;
        inherit (config.lib.file) mkOutOfStoreSymlink;
        cfg = config.wrappers.neovim;
      in
      {
        imports = [ self.wrappers.neovim.install ];

        wrappers.neovim = {
          enable = true;

          settings.config_directory = lib.mkForce (mkOutOfStoreSymlink "${dotfilesDir}/terminal/neovim");
        };

        home.sessionVariables = lib.mkIf cfg.enable {
          EDITOR = "${cfg.wrapper}/bin/nvim";
          VISUAL = "${cfg.wrapper}/bin/nvim";
        };

        programs.zsh.shellAliases = {
          vi = cfg.binName;
        };
      };
  };
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions