feat: isolate neovim and begin second configuration to nixify the first

This commit is contained in:
oddlama 2023-09-21 23:11:36 +02:00
parent 8de313d277
commit bf7ec956ae
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
6 changed files with 121 additions and 18 deletions

View file

@ -1,16 +1,40 @@
{pkgs, ...}: {
programs.neovim = {
withPython3 = true;
extraPython3Packages = pyPkgs: with pyPkgs; [openai];
withNodeJs = true;
};
{
config,
pkgs,
...
}: {
programs.neovim-custom.package = let
nvimConfig =
pkgs.neovimUtils.makeNeovimConfig {
wrapRc = false;
withPython3 = true;
withRuby = true;
withNodeJs = true;
#extraPython3Packages = p: [];
#plugins = [
# { plugin = pkgs.; config = ''''; optional = false; }
#];
}
// {
wrapperArgs = ["--add-flags" "--clean -u ${./aaa/init.lua}"];
};
in
pkgs.wrapNeovimUnstable pkgs.neovim-unwrapped nvimConfig;
home.packages = let
nvimConfig = pkgs.neovimUtils.makeNeovimConfig {
wrapRc = false;
withPython3 = true;
withRuby = true;
withNodeJs = true;
extraPython3Packages = p: with p; [openai];
};
in [(pkgs.wrapNeovimUnstable pkgs.neovim-unwrapped nvimConfig)];
xdg.configFile = {
"nvim/ftplugin".source = ./ftplugin;
"nvim/init.lua".source = ./init.lua;
"nvim/lua".source = ./lua;
};
# TODO NO! NO! all of this goes away
home.packages = with pkgs; [gcc shellcheck stylua];
home.sessionVariables.E = "${config.programs.neovim-custom.package}/bin/nvim";
}