{ config, ... }: let account = config.facts.account; theme = config.facts.theme.kanagawa; in { flake.modules.homeManager.default-editor-neovim = { pkgs, ... }: { xdg.mimeApps.defaultApplicationPackages = [ pkgs.neovim ]; }; flake.modules.homeManager.neovim = { pkgs, config, inputs, osConfig, ... }: { home.sessionVariables = { EDITOR = "nvim"; VISUAL = "nvim"; }; imports = [ (inputs.nix-wrapper-modules.lib.getInstallModule { name = "neovim"; value = inputs.nix-wrapper-modules.lib.wrapperModules.neovim; }) ]; wrappers.neovim = { enable = true; settings.config_directory = ./lua-config; runtimePkgs = with pkgs; [ ripgrep fd wl-clipboard stylua taplo yamlfmt lua-language-server nixd nixfmt dafny vscode-langservers-extracted tailwindcss-language-server rust-analyzer rustfmt astro-language-server tinymist typstyle websocat ty ruff vtsls oxlint oxfmt emmet-language-server svelte-language-server ]; specs = { lz-n = { data = pkgs.vimPlugins.lz-n; }; support = { data = with pkgs.vimPlugins; [ plenary-nvim kanagawa-nvim nvim-treesitter.withAllGrammars nvim-treesitter-textobjects rainbow-delimiters-nvim ]; }; completion = { lazy = true; data = with pkgs.vimPlugins; [ blink-cmp luasnip friendly-snippets colorful-menu-nvim ]; }; lsp = { lazy = true; data = with pkgs.vimPlugins; [ nvim-lspconfig lazydev-nvim nvim-navic trouble-nvim typst-preview-nvim ]; }; formatting = { lazy = true; data = with pkgs.vimPlugins; [ conform-nvim ]; }; core = { lazy = true; data = with pkgs.vimPlugins; [ mini-nvim guess-indent-nvim direnv-vim ]; }; ui = { lazy = true; data = with pkgs.vimPlugins; [ lualine-nvim gitsigns-nvim zen-mode-nvim which-key-nvim kulala-nvim ]; }; project = { lazy = true; data = with pkgs.vimPlugins; [ project-nvim ]; }; telescope = { lazy = true; data = with pkgs.vimPlugins; [ telescope-nvim telescope-fzf-native-nvim telescope-ui-select-nvim ]; }; }; settings = { nixdExtras = { nixpkgs = "import ${pkgs.path} {}"; nixos_options = ''(builtins.getFlake "path://${account.nixosConfigurationPath}").nixosConfigurations.${osConfig.facts.machine.name}.options''; home_manager_options = ''(builtins.getFlake "path://${account.nixosConfigurationPath}").nixosConfigurations.${osConfig.facts.machine.name}.options.home-manager.users.type.getSubOptions []''; }; themeSetup = import ./_kanagawa-theme.nix { themeName = theme.name; }; typstPreviewDependencies = { tinymist = "${pkgs.tinymist}/bin/tinymist"; websocat = "${pkgs.websocat}/bin/websocat"; }; }; hosts.python3.nvim-host.enable = true; hosts.node.nvim-host.enable = true; binName = "nvim"; }; }; }