nyanyanyanya
This commit is contained in:
parent
014e41d930
commit
3e3d076c76
15 changed files with 291 additions and 287 deletions
40
flake.nix
40
flake.nix
|
@ -20,14 +20,6 @@
|
||||||
forEachSystem = f: lib.genAttrs systems (system: f);
|
forEachSystem = f: lib.genAttrs systems (system: f);
|
||||||
forAllSystems = lib.genAttrs systems;
|
forAllSystems = lib.genAttrs systems;
|
||||||
lib = nixpkgs.lib // home-manager.lib;
|
lib = nixpkgs.lib // home-manager.lib;
|
||||||
mkHost = { hostname, user ? "sammy", }: {
|
|
||||||
imports = [ ./hosts/${hostname}/configuration.nix ./modules/nixos/common.nix (import "${home-manager}/nixos") ];
|
|
||||||
|
|
||||||
deployment = {
|
|
||||||
targetUser = user;
|
|
||||||
allowLocalDeployment = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
inherit lib;
|
inherit lib;
|
||||||
|
@ -36,18 +28,38 @@
|
||||||
devShells = forAllSystems (system:
|
devShells = forAllSystems (system:
|
||||||
let pkgs = import nixpkgs { system = system; }; in
|
let pkgs = import nixpkgs { system = system; }; in
|
||||||
{
|
{
|
||||||
default = pkgs.mkShell { nativeBuildInputs = [ pkgs.nix pkgs.colmena pkgs.git pkgs.home-manager ]; };
|
default = pkgs.mkShell {
|
||||||
|
nativeBuildInputs = [ pkgs.nix pkgs.colmena pkgs.git pkgs.home-manager pkgs.nixos-rebuild ];
|
||||||
|
shellHook = "exec $SHELL";
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
colmenaHive = colmena.lib.makeHive {
|
colmenaHive = colmena.lib.makeHive {
|
||||||
meta = {
|
meta = {
|
||||||
description = "All my NixoS machines";
|
description = "All my NixoS machines";
|
||||||
specialArgs = { inherit inputs outputs; };
|
specialArgs = {
|
||||||
|
inherit inputs outputs;
|
||||||
|
pkgs-unstable = import nixpkgs-unstable { system = "x86_64-linux"; };
|
||||||
|
};
|
||||||
nixpkgs = import nixpkgs { system = "x86_64-linux"; };
|
nixpkgs = import nixpkgs { system = "x86_64-linux"; };
|
||||||
};
|
};
|
||||||
|
|
||||||
bengal = mkHost { hostname = "bengal"; };
|
defaults = { lib, config, name, ... }: {
|
||||||
maine-coon = mkHost { hostname = "maine-coon"; };
|
imports = [ ./hosts/${name}/configuration.nix ./modules/nixos/common.nix (import "${home-manager}/nixos") ];
|
||||||
|
|
||||||
|
deployment = {
|
||||||
|
targetUser = "sammy";
|
||||||
|
allowLocalDeployment = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.extraSpecialArgs = {
|
||||||
|
inherit inputs outputs;
|
||||||
|
pkgs-unstable = import nixpkgs-unstable { system = "x86_64-linux"; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
bengal = { };
|
||||||
|
maine-coon = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
|
@ -64,6 +76,10 @@
|
||||||
lib.homeManagerConfiguration {
|
lib.homeManagerConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
modules = [ ./modules/users/sammy.nix ];
|
modules = [ ./modules/users/sammy.nix ];
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit inputs outputs;
|
||||||
|
pkgs-unstable = import nixpkgs-unstable { system = "x86_64-linux"; };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,102 +1,123 @@
|
||||||
{ config
|
{ config, lib, pkgs, pkgs-unstable, ... }:
|
||||||
, pkgs
|
|
||||||
, inputs
|
|
||||||
, ...
|
|
||||||
}: {
|
|
||||||
programs.neovim =
|
|
||||||
let
|
|
||||||
toLua = str: "lua << EOF\n${str}\nEOF\n";
|
|
||||||
toLuaFile = file: "lua << EOF\n${builtins.readFile file}\nEOF\n";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
viAlias = true;
|
{
|
||||||
vimAlias = true;
|
programs.neovim = {
|
||||||
vimdiffAlias = true;
|
enable = true;
|
||||||
|
package = pkgs-unstable.neovim-unwrapped;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
# LazyVim
|
||||||
|
lua-language-server
|
||||||
|
stylua
|
||||||
|
# Telescope
|
||||||
|
ripgrep
|
||||||
|
];
|
||||||
|
|
||||||
extraPackages = with pkgs; [
|
plugins = with pkgs.vimPlugins; [
|
||||||
lua-language-server
|
lazy-nvim
|
||||||
rnix-lsp
|
];
|
||||||
|
|
||||||
xclip
|
extraLuaConfig =
|
||||||
wl-clipboard
|
let
|
||||||
|
plugins = with pkgs.vimPlugins; [
|
||||||
rustfmt
|
# LazyVim
|
||||||
black
|
LazyVim
|
||||||
isort
|
bufferline-nvim
|
||||||
alejandra
|
cmp-buffer
|
||||||
prettierd
|
cmp-nvim-lsp
|
||||||
codespell
|
cmp-path
|
||||||
stylua
|
cmp_luasnip
|
||||||
];
|
conform-nvim
|
||||||
|
dashboard-nvim
|
||||||
plugins = with pkgs.vimPlugins; [
|
dressing-nvim
|
||||||
plenary-nvim
|
flash-nvim
|
||||||
persistence-nvim
|
friendly-snippets
|
||||||
nvim-web-devicons
|
gitsigns-nvim
|
||||||
nui-nvim
|
indent-blankline-nvim
|
||||||
|
lualine-nvim
|
||||||
{
|
neo-tree-nvim
|
||||||
plugin = comment-nvim;
|
neoconf-nvim
|
||||||
config = toLua "require(\"Comment\").setup()";
|
neodev-nvim
|
||||||
}
|
noice-nvim
|
||||||
|
nui-nvim
|
||||||
{
|
nvim-cmp
|
||||||
plugin = catppuccin-nvim;
|
nvim-lint
|
||||||
config = "colorscheme catppuccin-mocha";
|
nvim-lspconfig
|
||||||
}
|
nvim-notify
|
||||||
|
nvim-spectre
|
||||||
{
|
nvim-treesitter
|
||||||
plugin = which-key-nvim;
|
nvim-treesitter-context
|
||||||
config = toLua "require(\"which-key\").setup()";
|
nvim-treesitter-textobjects
|
||||||
}
|
nvim-ts-autotag
|
||||||
|
nvim-ts-context-commentstring
|
||||||
{
|
nvim-web-devicons
|
||||||
plugin = neo-tree-nvim;
|
persistence-nvim
|
||||||
config = toLuaFile ./plugins/neo-tree.lua;
|
plenary-nvim
|
||||||
}
|
telescope-fzf-native-nvim
|
||||||
|
telescope-nvim
|
||||||
{
|
todo-comments-nvim
|
||||||
plugin = conform-nvim;
|
tokyonight-nvim
|
||||||
config = toLuaFile ./plugins/conform.lua;
|
trouble-nvim
|
||||||
}
|
vim-illuminate
|
||||||
|
vim-startuptime
|
||||||
{
|
which-key-nvim
|
||||||
plugin = dressing-nvim;
|
{ name = "LuaSnip"; path = luasnip; }
|
||||||
config = toLua "require(\"dressing\").setup()";
|
{ name = "catppuccin"; path = catppuccin-nvim; }
|
||||||
}
|
{ name = "mini.ai"; path = mini-nvim; }
|
||||||
|
{ name = "mini.bufremove"; path = mini-nvim; }
|
||||||
{
|
{ name = "mini.comment"; path = mini-nvim; }
|
||||||
plugin = bufferline-nvim;
|
{ name = "mini.indentscope"; path = mini-nvim; }
|
||||||
config = toLua "require(\"bufferline\").setup()";
|
{ name = "mini.pairs"; path = mini-nvim; }
|
||||||
}
|
{ name = "mini.surround"; path = mini-nvim; }
|
||||||
|
];
|
||||||
{
|
mkEntryFromDrv = drv:
|
||||||
plugin = lualine-nvim;
|
if lib.isDerivation drv then
|
||||||
config = toLua "require(\"lualine\").setup()";
|
{ name = "${lib.getName drv}"; path = drv; }
|
||||||
}
|
else
|
||||||
|
drv;
|
||||||
{
|
lazyPath = pkgs.linkFarm "lazy-plugins" (builtins.map mkEntryFromDrv plugins);
|
||||||
plugin = indent-blankline-nvim;
|
in
|
||||||
config = toLua "require(\"ibl\").setup()";
|
''
|
||||||
}
|
require("lazy").setup({
|
||||||
{
|
defaults = {
|
||||||
plugin = noice-nvim;
|
lazy = true,
|
||||||
config = toLuaFile ./plugins/noice.lua;
|
},
|
||||||
}
|
dev = {
|
||||||
{
|
-- reuse files from pkgs.vimPlugins.*
|
||||||
plugin = dashboard-nvim;
|
path = "${lazyPath}",
|
||||||
config = toLuaFile ./plugins/dashboard.lua;
|
patterns = { "." },
|
||||||
}
|
-- fallback to download
|
||||||
|
fallback = true,
|
||||||
nvim-notify
|
},
|
||||||
vim-nix
|
spec = {
|
||||||
];
|
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||||
|
-- The following configs are needed for fixing lazyvim on nix
|
||||||
extraLuaConfig = ''
|
-- force enable telescope-fzf-native.nvim
|
||||||
${builtins.readFile ./options.lua}
|
{ "nvim-telescope/telescope-fzf-native.nvim", enabled = true },
|
||||||
${builtins.readFile ./keymap.lua}
|
-- disable mason.nvim, use programs.neovim.extraPackages
|
||||||
|
{ "williamboman/mason-lspconfig.nvim", enabled = false },
|
||||||
|
{ "williamboman/mason.nvim", enabled = false },
|
||||||
|
-- import/override with your plugins
|
||||||
|
{ import = "plugins" },
|
||||||
|
-- treesitter handled by xdg.configFile."nvim/parser", put this line at the end of spec to clear ensure_installed
|
||||||
|
{ "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = {} } },
|
||||||
|
},
|
||||||
|
})
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# https://github.com/nvim-treesitter/nvim-treesitter#i-get-query-error-invalid-node-type-at-position
|
||||||
|
xdg.configFile."nvim/parser".source =
|
||||||
|
let
|
||||||
|
parsers = pkgs.symlinkJoin {
|
||||||
|
name = "treesitter-parsers";
|
||||||
|
paths = (pkgs.vimPlugins.nvim-treesitter.withPlugins (plugins: with plugins; [
|
||||||
|
c
|
||||||
|
lua
|
||||||
|
])).dependencies;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
"${parsers}/parser";
|
||||||
|
|
||||||
|
# Normal LazyVim config here, see https://github.com/LazyVim/starter/tree/main/lua
|
||||||
|
xdg.configFile."nvim/lua".source = ./lua;
|
||||||
}
|
}
|
||||||
|
|
3
modules/home/nvim/lua/config/autocmds.lua
Normal file
3
modules/home/nvim/lua/config/autocmds.lua
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
-- Autocmds are automatically loaded on the VeryLazy event
|
||||||
|
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||||
|
-- Add any additional autocmds here
|
|
@ -1,11 +1,11 @@
|
||||||
local map = vim.keymap.set
|
-- Keymaps are automatically loaded on the VeryLazy event
|
||||||
local wk = require("which-key")
|
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||||
|
-- Add any additional keymaps here
|
||||||
|
|
||||||
-- better up/down
|
-- This file is automatically loaded by lazyvim.config.init
|
||||||
map({ "n", "x" }, "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
local Util = require("lazyvim.util")
|
||||||
map({ "n", "x" }, "<Down>", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
|
||||||
map({ "n", "x" }, "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
local map = vim.keymap.set
|
||||||
map({ "n", "x" }, "<Up>", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
|
||||||
|
|
||||||
-- Move to window using the <ctrl> hjkl keys
|
-- Move to window using the <ctrl> hjkl keys
|
||||||
map("n", "<C-h>", "<C-w>h", { desc = "Go to left window", remap = true })
|
map("n", "<C-h>", "<C-w>h", { desc = "Go to left window", remap = true })
|
||||||
|
@ -30,68 +30,61 @@ map("v", "<A-k>", ":m '<-2<cr>gv=gv", { desc = "Move up" })
|
||||||
-- buffers
|
-- buffers
|
||||||
map("n", "<S-h>", "<cmd>bprevious<cr>", { desc = "Prev buffer" })
|
map("n", "<S-h>", "<cmd>bprevious<cr>", { desc = "Prev buffer" })
|
||||||
map("n", "<S-l>", "<cmd>bnext<cr>", { desc = "Next buffer" })
|
map("n", "<S-l>", "<cmd>bnext<cr>", { desc = "Next buffer" })
|
||||||
|
map("n", "<leader>bb", "<cmd>e #<cr>", { desc = "Switch to Other Buffer" })
|
||||||
-- Clear search with <esc>
|
map("n", "<leader>`", "<cmd>e #<cr>", { desc = "Switch to Other Buffer" })
|
||||||
map({ "i", "n" }, "<esc>", "<cmd>noh<cr><esc>", { desc = "Escape and clear hlsearch" })
|
|
||||||
|
|
||||||
-- save file
|
-- save file
|
||||||
map({ "i", "x", "n", "s" }, "<C-s>", "<cmd>w<cr><esc>", { desc = "Save file" })
|
map({ "i", "x", "n", "s" }, "<C-s>", "<cmd>w<cr><esc>", { desc = "Save file" })
|
||||||
|
|
||||||
-- quit all
|
|
||||||
map("n", "<leader>qq", "<cmd>qa<cr>", { desc = "Quit all" })
|
|
||||||
|
|
||||||
--keywordprg
|
|
||||||
map("n", "<leader>K", "<cmd>norm! K<cr>", { desc = "Keywordprg" })
|
|
||||||
|
|
||||||
-- better indenting
|
|
||||||
map("v", "<", "<gv")
|
|
||||||
map("v", ">", ">gv")
|
|
||||||
|
|
||||||
wk.register({["<leader>f"] = { name = "File" }})
|
|
||||||
-- new file
|
-- new file
|
||||||
map("n", "<leader>fn", "<cmd>enew<cr>", { desc = "New File" })
|
map("n", "<leader>fn", "<cmd>enew<cr>", { desc = "New File" })
|
||||||
|
|
||||||
map("n", "<leader>xl", "<cmd>lopen<cr>", { desc = "Location List" })
|
map("n", "<leader>xl", "<cmd>lopen<cr>", { desc = "Location List" })
|
||||||
map("n", "<leader>xq", "<cmd>copen<cr>", { desc = "Quickfix List" })
|
map("n", "<leader>xq", "<cmd>copen<cr>", { desc = "Quickfix List" })
|
||||||
|
|
||||||
|
if not Util.has("trouble.nvim") then
|
||||||
|
map("n", "[q", vim.cmd.cprev, { desc = "Previous quickfix" })
|
||||||
|
map("n", "]q", vim.cmd.cnext, { desc = "Next quickfix" })
|
||||||
|
end
|
||||||
|
|
||||||
|
-- diagnostic
|
||||||
|
local diagnostic_goto = function(next, severity)
|
||||||
|
local go = next and vim.diagnostic.goto_next or vim.diagnostic.goto_prev
|
||||||
|
severity = severity and vim.diagnostic.severity[severity] or nil
|
||||||
|
return function()
|
||||||
|
go({ severity = severity })
|
||||||
|
end
|
||||||
|
end
|
||||||
|
map("n", "<leader>cd", vim.diagnostic.open_float, { desc = "Line Diagnostics" })
|
||||||
|
map("n", ")d", diagnostic_goto(true), { desc = "Next Diagnostic" })
|
||||||
|
map("n", "(d", diagnostic_goto(false), { desc = "Prev Diagnostic" })
|
||||||
|
map("n", ")e", diagnostic_goto(true, "ERROR"), { desc = "Next Error" })
|
||||||
|
map("n", "(e", diagnostic_goto(false, "ERROR"), { desc = "Prev Error" })
|
||||||
|
map("n", ")w", diagnostic_goto(true, "WARN"), { desc = "Next Warning" })
|
||||||
|
map("n", "(w", diagnostic_goto(false, "WARN"), { desc = "Prev Warning" })
|
||||||
|
|
||||||
|
-- windows
|
||||||
map("n", "<leader>ww", "<C-W>p", { desc = "Other window", remap = true })
|
map("n", "<leader>ww", "<C-W>p", { desc = "Other window", remap = true })
|
||||||
map("n", "<leader>wd", "<C-W>c", { desc = "Delete window", remap = true })
|
map("n", "<leader>wd", "<C-W>c", { desc = "Delete window", remap = true })
|
||||||
map("n", "<leader>w-", "<C-W>s", { desc = "Split window below", remap = true })
|
|
||||||
map("n", "<leader>w|", "<C-W>v", { desc = "Split window right", remap = true })
|
|
||||||
map("n", "<leader>-", "<C-W>s", { desc = "Split window below", remap = true })
|
map("n", "<leader>-", "<C-W>s", { desc = "Split window below", remap = true })
|
||||||
map("n", "<leader>|", "<C-W>v", { desc = "Split window right", remap = true })
|
map("n", "<leader>.", "<C-W>v", { desc = "Split window right", remap = true })
|
||||||
|
|
||||||
-- tabs
|
-- tabs
|
||||||
wk.register({["<leader><tab>"] = { name = "Tabs" }})
|
|
||||||
map("n", "<leader><tab>l", "<cmd>tablast<cr>", { desc = "Last Tab" })
|
map("n", "<leader><tab>l", "<cmd>tablast<cr>", { desc = "Last Tab" })
|
||||||
map("n", "<leader><tab>f", "<cmd>tabfirst<cr>", { desc = "First Tab" })
|
map("n", "<leader><tab>f", "<cmd>tabfirst<cr>", { desc = "First Tab" })
|
||||||
map("n", "<leader><tab><tab>", "<cmd>tabnew<cr>", { desc = "New Tab" })
|
map("n", "<leader><tab><tab>", "<cmd>tabnew<cr>", { desc = "New Tab" })
|
||||||
map("n", "<leader><tab>]", "<cmd>tabnext<cr>", { desc = "Next Tab" })
|
map("n", "<leader><tab>n", "<cmd>tabnext<cr>", { desc = "Next Tab" })
|
||||||
map("n", "<leader><tab>d", "<cmd>tabclose<cr>", { desc = "Close Tab" })
|
map("n", "<leader><tab>d", "<cmd>tabclose<cr>", { desc = "Close Tab" })
|
||||||
map("n", "<leader><tab>[", "<cmd>tabprevious<cr>", { desc = "Previous Tab" })
|
map("n", "<leader><tab>p", "<cmd>tabprevious<cr>", { desc = "Previous Tab" })
|
||||||
|
|
||||||
|
-- Unmapping some lazyvim default keymaps
|
||||||
|
local unmap = vim.keymap.del
|
||||||
|
|
||||||
-- NeoTree
|
unmap("n", "[b")
|
||||||
map("n", "<leader>fe",
|
unmap("n", "]b")
|
||||||
function()
|
unmap("n", "<leader>/")
|
||||||
require("neo-tree.command").execute({ toggle = true, dir = vim.loop.cwd() })
|
unmap("n", "<leader>|")
|
||||||
end, { desc = "NeoTree" }
|
unmap("n", "<leader>L")
|
||||||
)
|
unmap("n", "<leader>`")
|
||||||
map("n", "<leader>e", "<leader>fe", { desc = "NeoTree", remap = true })
|
unmap("n", "<leader><tab>[")
|
||||||
|
unmap("n", "<leader><tab>]")
|
||||||
map("n", "<leader>ge",
|
|
||||||
function()
|
|
||||||
require("neo-tree.command").execute({ source = "git_status", toggle = true })
|
|
||||||
end, { desc = "Git explorer" }
|
|
||||||
)
|
|
||||||
map("n", "<leader>be",
|
|
||||||
function()
|
|
||||||
require("neo-tree.command").execute({ source = "buffers", toggle = true })
|
|
||||||
end, { desc = "Buffer explorer" }
|
|
||||||
)
|
|
||||||
|
|
||||||
map({"n", "v"}, "<leader>cf",
|
|
||||||
function()
|
|
||||||
require("conform").format({ async = true, lsp_fallback = true, range = range })
|
|
||||||
end, { desc = "Format Code" }
|
|
||||||
)
|
|
56
modules/home/nvim/lua/config/lazy.lua
Normal file
56
modules/home/nvim/lua/config/lazy.lua
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
|
-- bootstrap lazy.nvim
|
||||||
|
-- stylua: ignore
|
||||||
|
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
||||||
|
|
||||||
|
require("lazy").setup({
|
||||||
|
spec = {
|
||||||
|
-- add LazyVim and import its plugins
|
||||||
|
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||||
|
-- import any extras modules here
|
||||||
|
{ import = "lazyvim.plugins.extras.formatting.black" },
|
||||||
|
{ import = "lazyvim.plugins.extras.formatting.prettier" },
|
||||||
|
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.docker" },
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.markdown" },
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.python" },
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.rust" },
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.tailwind" },
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.yaml" },
|
||||||
|
|
||||||
|
{ import = "lazyvim.plugins.extras.linting.eslint" },
|
||||||
|
-- import/override with your plugins
|
||||||
|
{ import = "plugins" },
|
||||||
|
},
|
||||||
|
defaults = {
|
||||||
|
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||||
|
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
||||||
|
lazy = false,
|
||||||
|
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
||||||
|
-- have outdated releases, which may break your Neovim install.
|
||||||
|
version = false, -- always use the latest git commit
|
||||||
|
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||||
|
},
|
||||||
|
install = { colorscheme = { "catppuccin" } },
|
||||||
|
checker = { enabled = true }, -- automatically check for plugin updates
|
||||||
|
performance = {
|
||||||
|
rtp = {
|
||||||
|
-- disable some rtp plugins
|
||||||
|
disabled_plugins = {
|
||||||
|
"gzip",
|
||||||
|
-- "matchit",
|
||||||
|
-- "matchparen",
|
||||||
|
-- "netrwPlugin",
|
||||||
|
"tarPlugin",
|
||||||
|
"tohtml",
|
||||||
|
"tutor",
|
||||||
|
"zipPlugin",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
13
modules/home/nvim/lua/config/options.lua
Normal file
13
modules/home/nvim/lua/config/options.lua
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
-- Options are automatically loaded before lazy.nvim startup
|
||||||
|
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||||
|
-- Add any additional options here
|
||||||
|
-- This file is automatically loaded by plugins.core
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
vim.g.maplocalleader = "\\"
|
||||||
|
|
||||||
|
vim.g.autoformat = false
|
||||||
|
|
||||||
|
local opt = vim.opt
|
||||||
|
|
||||||
|
opt.spelllang = { "en", "de" }
|
||||||
|
opt.autoread = true
|
9
modules/home/nvim/lua/plugins/ansible.lua
Normal file
9
modules/home/nvim/lua/plugins/ansible.lua
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
|
||||||
|
--
|
||||||
|
-- In your plugin files, you can:
|
||||||
|
-- * add extra plugins
|
||||||
|
-- * disable/enabled LazyVim plugins
|
||||||
|
-- * override the configuration of LazyVim plugins
|
||||||
|
return {
|
||||||
|
{ "pearofducks/ansible-vim", name = "ansible" }
|
||||||
|
}
|
18
modules/home/nvim/lua/plugins/example.lua
Normal file
18
modules/home/nvim/lua/plugins/example.lua
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
|
||||||
|
--
|
||||||
|
-- In your plugin files, you can:
|
||||||
|
-- * add extra plugins
|
||||||
|
-- * disable/enabled LazyVim plugins
|
||||||
|
-- * override the configuration of LazyVim plugins
|
||||||
|
return {
|
||||||
|
-- add catppuccin
|
||||||
|
{ "catppuccin/nvim", name = "catppuccin", priority = 1000 },
|
||||||
|
|
||||||
|
-- Configure LazyVim to load catppuccin
|
||||||
|
{
|
||||||
|
"LazyVim/LazyVim",
|
||||||
|
opts = {
|
||||||
|
colorscheme = "catppuccin",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,54 +0,0 @@
|
||||||
-- partially taken from https://www.lazyvim.org and merged with my own config
|
|
||||||
--
|
|
||||||
vim.g.mapleader = " "
|
|
||||||
vim.g.maplocalleader = "\\"
|
|
||||||
|
|
||||||
-- root dir detection
|
|
||||||
vim.g.root_spec = { "lsp", { ".git", "lua" }, "cwd" }
|
|
||||||
|
|
||||||
local opt = vim.opt
|
|
||||||
|
|
||||||
opt.autowrite = true -- Enable auto write
|
|
||||||
opt.autoread = true
|
|
||||||
opt.clipboard = "unnamedplus" -- Sync with system clipboard
|
|
||||||
opt.completeopt = "menu,menuone,noselect"
|
|
||||||
opt.conceallevel = 3 -- Hide * markup for bold and italic
|
|
||||||
opt.confirm = true -- Confirm to save changes before exiting modified buffer
|
|
||||||
opt.cursorline = true -- Enable highlighting of the current line
|
|
||||||
opt.ignorecase = true -- Ignore case in search
|
|
||||||
opt.inccommand = "nosplit" -- preview incremental substitute
|
|
||||||
opt.laststatus = 3 -- global statusline
|
|
||||||
opt.list = true -- Show some invisible characters (tabs...
|
|
||||||
opt.mouse = "a" -- Enable mouse mode
|
|
||||||
opt.number = true -- Print line number
|
|
||||||
opt.pumblend = 10 -- Popup blend
|
|
||||||
opt.pumheight = 10 -- Maximum number of entries in a popup
|
|
||||||
opt.relativenumber = true -- Relative line numbers
|
|
||||||
opt.scrolloff = 4 -- Lines of context
|
|
||||||
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize", "help", "globals", "skiprtp", "folds" }
|
|
||||||
opt.shiftround = true -- Round indent
|
|
||||||
opt.shiftwidth = 2 -- Size of an indent
|
|
||||||
opt.shortmess:append({ W = true, I = true, c = true, C = true })
|
|
||||||
opt.showmode = false -- Dont show mode since we have a statusline
|
|
||||||
opt.sidescrolloff = 8 -- Columns of context
|
|
||||||
opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
|
|
||||||
opt.smartcase = true -- Don't ignore case with capitals
|
|
||||||
opt.smartindent = true -- Insert indents automatically
|
|
||||||
opt.spelllang = { "en", "de" }
|
|
||||||
opt.splitbelow = true -- Put new windows below current
|
|
||||||
opt.splitkeep = "screen"
|
|
||||||
opt.splitright = true -- Put new windows right of current
|
|
||||||
opt.tabstop = 2 -- Number of spaces tabs count for
|
|
||||||
opt.termguicolors = true -- True color support
|
|
||||||
opt.timeoutlen = 300
|
|
||||||
opt.undofile = true
|
|
||||||
opt.undolevels = 10000
|
|
||||||
opt.updatetime = 200 -- Save swap file and trigger CursorHold
|
|
||||||
opt.virtualedit = "block" -- Allow cursor to move where there is no text in visual block mode
|
|
||||||
opt.wildmode = "longest:full,full" -- Command-line completion mode
|
|
||||||
opt.winminwidth = 5 -- Minimum window width
|
|
||||||
opt.wrap = false -- Disable line wrap
|
|
||||||
|
|
||||||
-- Fix markdown indentation settings
|
|
||||||
vim.g.markdown_recommended_style = 0
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
require("conform").setup({
|
|
||||||
formatters_by_ft = {
|
|
||||||
lua = { "stylua" },
|
|
||||||
python = { "isort", "black" },
|
|
||||||
javascript = { "prettier" },
|
|
||||||
rust = { "rustfmt" },
|
|
||||||
nix = { "alejandra" },
|
|
||||||
["*"] = { "codespell" },
|
|
||||||
},
|
|
||||||
log_level = vim.log.levels.ERROR,
|
|
||||||
notify_on_error = true,
|
|
||||||
})
|
|
|
@ -1,41 +0,0 @@
|
||||||
local opts = {
|
|
||||||
sources = { "filesystem", "buffers", "git_status", "document_symbols" },
|
|
||||||
open_files_do_not_replace_types = { "terminal", "Trouble", "trouble", "qf", "Outline" },
|
|
||||||
filesystem = {
|
|
||||||
bind_to_cwd = false,
|
|
||||||
follow_current_file = { enabled = true },
|
|
||||||
use_libuv_file_watcher = true,
|
|
||||||
},
|
|
||||||
window = {
|
|
||||||
mappings = {
|
|
||||||
["<space>"] = "none",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
default_component_configs = {
|
|
||||||
indent = {
|
|
||||||
indent_size = 2,
|
|
||||||
padding = 1, -- extra padding on left hand side
|
|
||||||
-- indent guides
|
|
||||||
with_markers = true,
|
|
||||||
indent_marker = "│",
|
|
||||||
last_indent_marker = "└",
|
|
||||||
highlight = "NeoTreeIndentMarker",
|
|
||||||
-- expander config, needed for nesting files
|
|
||||||
with_expanders = nil, -- if nil and file nesting is enabled, will enable expanders
|
|
||||||
expander_collapsed = "",
|
|
||||||
expander_expanded = "",
|
|
||||||
expander_highlight = "NeoTreeExpander",
|
|
||||||
},
|
|
||||||
icon = {
|
|
||||||
folder_closed = "",
|
|
||||||
folder_open = "",
|
|
||||||
folder_empty = "",
|
|
||||||
-- The next two settings are only a fallback, if you use nvim-web-devicons and configure default icons there
|
|
||||||
-- then these will never be used.
|
|
||||||
default = "*",
|
|
||||||
highlight = "NeoTreeFileIcon",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
require("neo-tree").setup(opts)
|
|
|
@ -1,18 +0,0 @@
|
||||||
require("noice").setup({
|
|
||||||
lsp = {
|
|
||||||
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
|
||||||
override = {
|
|
||||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
|
||||||
["vim.lsp.util.stylize_markdown"] = true,
|
|
||||||
["cmp.entry.get_documentation"] = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- you can enable a preset for easier configuration
|
|
||||||
presets = {
|
|
||||||
bottom_search = true, -- use a classic bottom cmdline for search
|
|
||||||
command_palette = true, -- position the cmdline and popupmenu together
|
|
||||||
long_message_to_split = true, -- long messages will be sent to a split
|
|
||||||
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
|
||||||
lsp_doc_border = false, -- add a border to hover docs and signature help
|
|
||||||
},
|
|
||||||
})
|
|
|
@ -19,7 +19,7 @@ in
|
||||||
./security.nix
|
./security.nix
|
||||||
../users
|
../users
|
||||||
./yubikey.nix
|
./yubikey.nix
|
||||||
../virtualization.nix
|
./virtualization.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
|
@ -7,6 +7,6 @@
|
||||||
cores = 6;
|
cores = 6;
|
||||||
graphics = true;
|
graphics = true;
|
||||||
};
|
};
|
||||||
users.users.sammy.password = "test";
|
users.users.sammy.initialPassword = "test";
|
||||||
};
|
};
|
||||||
}
|
}
|
Loading…
Reference in a new issue