Test nixvim

This commit is contained in:
iFargle 2024-02-08 11:17:11 +09:00
parent 8100be2667
commit f1d4be3d2d
5 changed files with 42 additions and 92 deletions

View file

@ -45,7 +45,9 @@
compose2nix.inputs.nixpkgs.follows = "nixpkgs"; compose2nix.inputs.nixpkgs.follows = "nixpkgs";
# Hyprland Flake # Hyprland Flake
hyprland.url = "github:hyprwm/Hyprland"; hyprland.url = "github:hyprwm/Hyprland";
# nixvim - neovim configuration management in nix
nixvim.url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = { self, nixpkgs, nixpkgs-unstable, nixpkgs-wayland, home-manager, lanzaboote, nur, sops-nix, doom-emacs, nixos-generators, deploy-rs, ... } @inputs: outputs = { self, nixpkgs, nixpkgs-unstable, nixpkgs-wayland, home-manager, lanzaboote, nur, sops-nix, doom-emacs, nixos-generators, deploy-rs, ... } @inputs:
let let

View file

@ -7,7 +7,6 @@
./neofetch.nix ./neofetch.nix
./ranger.nix ./ranger.nix
./ssh.nix ./ssh.nix
./nixvim.nix
./neovim
]; ];
} }

View file

@ -1,49 +0,0 @@
local overrides = require("custom.configs.overrides")
---@type NvPluginSpec[]
local plugins = {
-- Override plugin definition options
-- override plugin configs
{
"williamboman/mason.nvim",
opts = overrides.mason
},
{
"nvim-treesitter/nvim-treesitter",
opts = overrides.treesitter,
},
{
"nvim-tree/nvim-tree.lua",
opts = overrides.nvimtree,
},
-- Install a plugin
{
"max397574/better-escape.nvim",
event = "InsertEnter",
config = function()
require("better_escape").setup()
end,
},
-- vim-fugitive for integrated Git
{
"tpope/vim-fugitive",
event = "VeryLazy",
},
-- fzf fuzzyfinder
{
"vijaymarupudi/nvim-fzf",
event = "InsertEnter",
config = function()
require("nvim-fzf").setup()
end,
},
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' }
}
return plugins

View file

@ -1,40 +0,0 @@
{config, pkgs, ... }: {
programs.neovim = {
package = pkgs.neovim-unwrapped;
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
plugins = with pkgs.vimPlugins; [
nvchad
];
};
# nvchad requires gcc, npm, and unzip
home.packages = [
pkgs.gcc
pkgs.unzip
pkgs.nodejs_20
pkgs.ripgrep
pkgs.fd
pkgs.lazygit
pkgs.fzf
pkgs.cmake #fzf plugin
];
# Link the nvchad files to my homedir
# https://mipmip.github.io/home-manager-option-search/?query=xdg.dataFile
xdg.configFile."nvim" = {
enable = true;
recursive = true;
source = "${pkgs.vimPlugins.nvchad}/";
target = "./nvim";
};
xdg.configFile."nvim-custom-plugins" = {
enable = true;
target = "./nvim/lua/custom/plugins.lua";
text = builtins.readFile ./custom/plugins.lua;
};
}

View file

@ -0,0 +1,38 @@
{ inputs, pkgs, config, lib, ... }: {
imports = [
inputs.nixvim.homeManagerModules.nixvim
];
programs.nixvim = {
enable = true;
options = {
number = true;
shiftwidth = 2;
};
plugins = {
lualine.enable = true;
treesitter.enable = true;
telescope.enable = true;
rainbow-delimiters.enable = true;
nvim-tree.enable = true;
nvim-colorizer.enable = true;
nvim-cmp.enable = true;
nix.enable = true;
nix-develop.enable = true;
fugitive.enable = true;
};
colorschemes = {
tokyonight.enable = true;
gruvbox.enable = true;
dracula.enable = true;
base16.enable = true;
catpuccin.enable = true;
};
extraPlugins = with pkgs.vimPlugins [
everforest
];
};
}