nixcats
This commit is contained in:
158
modules/home-manager/nixcats/default.nix
Normal file
158
modules/home-manager/nixcats/default.nix
Normal file
@@ -0,0 +1,158 @@
|
||||
{ config, lib, inputs, ... }: let
|
||||
utils = inputs.nixCats.utils;
|
||||
in {
|
||||
imports = [
|
||||
inputs.nixCats.homeModule
|
||||
];
|
||||
config = {
|
||||
nixCats = {
|
||||
enable = true;
|
||||
packageNames = [ "nvim" ];
|
||||
|
||||
luaPath = ./.;
|
||||
|
||||
# for useage of this section, refer to :h nixCats.flake.outputs.categories
|
||||
categoryDefinitions.replace = ({ pkgs, settings, categories, extra, name, mkPlugin, ... }@packageDef: {
|
||||
# lspsAndRuntimeDeps:
|
||||
# this section is for dependencies that should be available
|
||||
# at RUN TIME for plugins. Will be available to PATH within neovim terminal
|
||||
# this includes LSPs
|
||||
lspsAndRuntimeDeps = {
|
||||
general = with pkgs; [
|
||||
lazygit
|
||||
ripgrep
|
||||
fzf
|
||||
];
|
||||
lua = with pkgs; [
|
||||
lua-language-server
|
||||
stylua
|
||||
];
|
||||
nix = with pkgs; [
|
||||
nixd
|
||||
alejandra
|
||||
];
|
||||
go = with pkgs; [
|
||||
gopls
|
||||
delve
|
||||
golint
|
||||
golangci-lint
|
||||
gotools
|
||||
go-tools
|
||||
go
|
||||
];
|
||||
typescript = with pkgs; [
|
||||
typescript-language-server
|
||||
vscode-langservers-extracted
|
||||
vue-language-server
|
||||
];
|
||||
};
|
||||
|
||||
# This is for plugins that will load at startup without using packadd:
|
||||
startupPlugins = {
|
||||
general = with pkgs.vimPlugins; [
|
||||
# lazy loading isnt required with a config this small
|
||||
# but as a demo, we do it anyway.
|
||||
lze
|
||||
lzextras
|
||||
snacks-nvim
|
||||
gruvbox-nvim
|
||||
vim-sleuth
|
||||
oil-nvim
|
||||
plenary-nvim
|
||||
];
|
||||
};
|
||||
|
||||
# not loaded automatically at startup.
|
||||
# use with packadd and an autocommand in config to achieve lazy loading
|
||||
optionalPlugins = {
|
||||
go = with pkgs.vimPlugins; [
|
||||
nvim-dap-go
|
||||
];
|
||||
lua = with pkgs.vimPlugins; [
|
||||
lazydev-nvim
|
||||
];
|
||||
general = with pkgs.vimPlugins; [
|
||||
mini-nvim
|
||||
nvim-lspconfig
|
||||
blink-cmp
|
||||
nvim-treesitter.withAllGrammars
|
||||
gitsigns-nvim
|
||||
harpoon2
|
||||
which-key-nvim
|
||||
nvim-lint
|
||||
conform-nvim
|
||||
nvim-dap
|
||||
nvim-dap-ui
|
||||
nvim-dap-virtual-text
|
||||
];
|
||||
};
|
||||
|
||||
# shared libraries to be added to LD_LIBRARY_PATH
|
||||
# variable available to nvim runtime
|
||||
sharedLibraries = {
|
||||
general = with pkgs; [ ];
|
||||
};
|
||||
|
||||
# environmentVariables:
|
||||
# this section is for environmentVariables that should be available
|
||||
# at RUN TIME for plugins. Will be available to path within neovim terminal
|
||||
environmentVariables = {
|
||||
# test = {
|
||||
# CATTESTVAR = "It worked!";
|
||||
# };
|
||||
};
|
||||
|
||||
# categories of the function you would have passed to withPackages
|
||||
python3.libraries = {
|
||||
# test = [ (_:[]) ];
|
||||
};
|
||||
|
||||
# If you know what these are, you can provide custom ones by category here.
|
||||
# If you dont, check this link out:
|
||||
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/setup-hooks/make-wrapper.sh
|
||||
extraWrapperArgs = {
|
||||
# test = [
|
||||
# '' --set CATTESTVAR2 "It worked again!"''
|
||||
# ];
|
||||
};
|
||||
});
|
||||
|
||||
# see :help nixCats.flake.outputs.packageDefinitions
|
||||
packageDefinitions.replace = {
|
||||
# These are the names of your packages
|
||||
# you can include as many as you wish.
|
||||
nvim = {pkgs, name, ... }: {
|
||||
# they contain a settings set defined above
|
||||
# see :help nixCats.flake.outputs.settings
|
||||
settings = {
|
||||
suffix-path = true;
|
||||
suffix-LD = true;
|
||||
wrapRc = true;
|
||||
# unwrappedCfgPath = "/path/to/here";
|
||||
# IMPORTANT:
|
||||
# your alias may not conflict with your other packages.
|
||||
aliases = [ "vim" "homeVim" ];
|
||||
# neovim-unwrapped = inputs.neovim-nightly-overlay.packages.${pkgs.system}.neovim;
|
||||
hosts.python3.enable = true;
|
||||
hosts.node.enable = true;
|
||||
};
|
||||
# and a set of categories that you want
|
||||
# (and other information to pass to lua)
|
||||
# and a set of categories that you want
|
||||
categories = {
|
||||
general = true;
|
||||
lua = true;
|
||||
nix = true;
|
||||
go = true;
|
||||
typescript = true;
|
||||
};
|
||||
# anything else to pass and grab in lua with `nixCats.extra`
|
||||
extra = {
|
||||
nixdExtras.nixpkgs = ''import ${pkgs.path} {}'';
|
||||
vueExtras.location = "${lib.getBin pkgs.vue-language-server}/lib/node_modules/@vue/language-server";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user