add config

This commit is contained in:
Patrick Michl 2024-11-05 13:01:15 +01:00
parent e0cbe28786
commit 28d8213ebc
No known key found for this signature in database
GPG Key ID: BFE0ACEE21CD5EB0
23 changed files with 1240 additions and 0 deletions

20
config/auto_cmds.nix Normal file
View File

@ -0,0 +1,20 @@
{
autoGroups = {
highlight_yank = {};
};
autoCmd = [
{
group = "highlight_yank";
event = ["TextYankPost"];
pattern = "*";
callback = {
__raw = ''
function()
vim.highlight.on_yank()
end
'';
};
}
];
}

32
config/default.nix Normal file
View File

@ -0,0 +1,32 @@
_: {
imports = [
./settings.nix
./auto_cmds.nix
./plugins/themes/default.nix
./plugins/utils/telescope.nix
./plugins/utils/toggleterm.nix
./plugins/utils/extras.nix
./plugins/git/lazygit.nix
./plugins/git/gitsigns.nix
./plugins/lsp/lsp.nix
./plugins/editor/navic.nix
./plugins/editor/illuminate.nix
./plugins/editor/neo-tree.nix
./plugins/editor/todo-comments.nix
./plugins/editor/treesitter.nix
./plugins/ui/bufferline.nix
./plugins/ui/lualine.nix
./plugins/snippets/luasnip.nix
./plugins/cmp/cmp.nix
./plugins/cmp/lspkind.nix
./plugins/cmp/schemastore.nix
];
}

116
config/plugins/cmp/cmp.nix Normal file
View File

@ -0,0 +1,116 @@
{
plugins = {
cmp-emoji.enable = true;
cmp-nvim-lsp.enable = true;
cmp-buffer.enable = true;
cmp-path.enable = true;
cmp_luasnip.enable = true;
cmp-cmdline.enable = false;
cmp = {
enable = true;
settings = {
autoEnableSources = true;
experimental = {ghost_text = false;};
performance = {
debounce = 60;
fetchingTimeout = 200;
maxViewEntries = 30;
};
snippet = {expand = "luasnip";};
formatting = {fields = ["kind" "abbr" "menu"];};
sources = [
{name = "git";}
{name = "nvim_lsp";}
{name = "emoji";}
{
name = "buffer"; # text within current buffer
option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
keywordLength = 3;
}
{
name = "path"; # file system paths
keywordLength = 3;
}
{
name = "luasnip"; # snippets
keywordLength = 3;
}
];
window = {
completion = {border = "solid";};
documentation = {border = "solid";};
};
mapping = {
"<C-Tab>" =
/*
lua
*/
"cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
"<Down>" =
/*
lua
*/
"cmp.mapping.select_next_item()";
"<Up>" =
/*
lua
*/
"cmp.mapping.select_prev_item()";
"<C-e>" =
/*
lua
*/
"cmp.mapping.abort()";
"<C-b>" =
/*
lua
*/
"cmp.mapping.scroll_docs(-4)";
"<C-f>" =
/*
lua
*/
"cmp.mapping.scroll_docs(4)";
"<C-Space>" =
/*
lua
*/
"cmp.mapping.complete()";
"<CR>" =
/*
lua
*/
"cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true })";
"<TAB>" =
/*
lua
*/
''
function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end
'';
"<S-TAB>" =
/*
lua
*/
''
function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end
'';
};
};
};
};
}

View File

@ -0,0 +1,9 @@
{
plugins.lspkind = {
enable = true;
extraOptions = {
maxwidth = 50;
ellipsis_char = "...";
};
};
}

View File

@ -0,0 +1,13 @@
{
plugins.schemastore = {
enable = true;
json = {
enable = true;
};
yaml = {
enable = true;
};
};
}

View File

@ -0,0 +1,13 @@
{
plugins.illuminate = {
enable = true;
underCursor = false;
filetypesDenylist = [
"Outline"
"TelescopePrompt"
"alpha"
"harpoon"
"reason"
];
};
}

View File

@ -0,0 +1,40 @@
_: {
plugins.navic = {
enable = true;
settings = {
separator = " ";
highlight = true;
depthLimit = 5;
lsp = {
autoAttach = true;
};
icons = {
Array = "󱃵 ";
Boolean = " ";
Class = " ";
Constant = " ";
Constructor = " ";
Enum = " ";
EnumMember = " ";
Event = " ";
Field = "󰽏 ";
File = " ";
Function = "󰡱 ";
Interface = " ";
Key = " ";
Method = " ";
Module = "󰕳 ";
Namespace = " ";
Null = "󰟢 ";
Number = " ";
Object = " ";
Operator = " ";
Package = "󰏖 ";
String = " ";
Struct = " ";
TypeParameter = " ";
Variable = " ";
};
};
};
}

View File

@ -0,0 +1,43 @@
{
plugins.neo-tree = {
enable = true;
sources = ["filesystem" "buffers" "git_status" "document_symbols"];
addBlankLineAtTop = false;
filesystem = {
bindToCwd = true;
};
defaultComponentConfigs = {
indent = {
withExpanders = true;
expanderCollapsed = "󰅂";
expanderExpanded = "󰅀";
expanderHighlight = "NeoTreeExpander";
};
gitStatus = {
symbols = {
added = " ";
conflict = "󰩌 ";
deleted = "󱂥";
ignored = " ";
modified = " ";
renamed = "󰑕";
staged = "󰩍";
unstaged = "";
untracked = " ";
};
};
};
};
keymaps = [
{
mode = ["n"];
key = "<C-n>";
action = "<cmd>Neotree toggle<cr>";
options = {desc = "Open/Close Neotree";};
}
];
}

View File

@ -0,0 +1,14 @@
{
plugins.todo-comments = {
enable = true;
settings = {
colors = {
error = ["DiagnosticError" "ErrorMsg" "#ED8796"];
warning = ["DiagnosticWarn" "WarningMsg" "#EED49F"];
info = ["DiagnosticInfo" "#EED49F"];
default = ["Identifier" "#F5A97F"];
test = ["Identifier" "#8AADF4"];
};
};
};
}

View File

@ -0,0 +1,61 @@
{pkgs, ...}: {
plugins.treesitter = {
enable = true;
settings = {
indent.enable = true;
highlight.enable = true;
};
folding = false;
nixvimInjections = true;
grammarPackages = pkgs.vimPlugins.nvim-treesitter.allGrammars;
};
plugins.treesitter-textobjects = {
enable = false;
select = {
enable = true;
lookahead = true;
keymaps = {
"aa" = "@parameter.outer";
"ia" = "@parameter.inner";
"af" = "@function.outer";
"if" = "@function.inner";
"ac" = "@class.outer";
"ic" = "@class.inner";
"ii" = "@conditional.inner";
"ai" = "@conditional.outer";
"il" = "@loop.inner";
"al" = "@loop.outer";
"at" = "@comment.outer";
};
};
move = {
enable = true;
gotoNextStart = {
"]m" = "@function.outer";
"]]" = "@class.outer";
};
gotoNextEnd = {
"]M" = "@function.outer";
"][" = "@class.outer";
};
gotoPreviousStart = {
"[m" = "@function.outer";
"[[" = "@class.outer";
};
gotoPreviousEnd = {
"[M" = "@function.outer";
"[]" = "@class.outer";
};
};
swap = {
enable = true;
swapNext = {
"<leader>a" = "@parameters.inner";
};
swapPrevious = {
"<leader>A" = "@parameter.outer";
};
};
};
}

View File

@ -0,0 +1,27 @@
_: {
plugins.gitsigns = {
enable = true;
settings = {
signs = {
add = {
text = " ";
};
change = {
text = " ";
};
delete = {
text = " ";
};
untracked = {
text = "";
};
topdelete = {
text = "󱂥 ";
};
changedelete = {
text = "󱂧 ";
};
};
};
};
}

View File

@ -0,0 +1,24 @@
{pkgs, ...}: {
extraPlugins = with pkgs.vimPlugins; [
lazygit-nvim
];
extraConfigLua =
/*
lua
*/
''
require("telescope").load_extension("lazygit")
'';
keymaps = [
{
mode = "n";
key = "<leader>gg";
action = "<cmd>LazyGit<CR>";
options = {
desc = "LazyGit (root dir)";
};
}
];
}

133
config/plugins/lsp/lsp.nix Normal file
View File

@ -0,0 +1,133 @@
{pkgs, ...}: {
plugins = {
lsp-lines.enable = true;
lsp-format.enable = true;
lsp = {
enable = true;
inlayHints = true;
servers = {
html.enable = true;
lua_ls.enable = true;
nil_ls.enable = true;
marksman.enable = true;
ansiblels.enable = true;
jsonls.enable = true;
solargraph.enable = true;
bashls.enable = true;
yamlls = {
enable = true;
extraOptions = {
settings = {
yaml = {
schemas = {
kubernetes = ".h8s/*.{yml,yaml}";
"http://json.schemastore.org/github-workflow" = ".github/workflows/*";
"http://json.schemastore.org/github-action" = ".github/action.{yml,yaml}";
"http://json.schemastore.org/ansible-stable-2.9" = "roles/tasks/*.{yml,yaml}";
"http://json.schemastore.org/kustomization" = "kustomization.{yml,yaml}";
"http://json.schemastore.org/ansible-playbook" = "*play*.{yml,yaml}";
"http://json.schemastore.org/chart" = "Chart.{yml,yaml}";
"https://json.schemastore.org/dependabot-v2" = ".github/dependabot.{yml,yaml}";
"https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json" = "*docker-compose*.{yml,yaml}";
"https://raw.githubusercontent.com/argoproj/argo-workflows/master/api/jsonschema/schema.json" = "*flow*.{yml,yaml}";
"https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json" = ".gitlab-ci.yml";
};
};
};
};
};
};
keymaps = {
silent = true;
lspBuf = {
gd = {
action = "definition";
desc = "Goto Definition";
};
gr = {
action = "references";
desc = "Goto References";
};
gD = {
action = "declaration";
desc = "Goto Declaration";
};
gI = {
action = "implementation";
desc = "Goto Implementation";
};
gT = {
action = "type_definition";
desc = "Type Definition";
};
ga = {
action = "code_action";
desc = "Code Action";
};
ff = {
action = "format";
desc = "Format Code";
};
K = {
action = "hover";
desc = "Hover";
};
"<leader>cw" = {
action = "workspace_symbol";
desc = "Workspace Symbol";
};
"<leader>cr" = {
action = "rename";
desc = "Rename";
};
};
diagnostic = {
"<leader>cd" = {
action = "open_float";
desc = "Line Diagnostics";
};
"[d" = {
action = "goto_next";
desc = "Next Diagnostic";
};
"]d" = {
action = "goto_prev";
desc = "Previous Diagnostic";
};
};
};
};
};
extraPlugins = with pkgs.vimPlugins; [
ansible-vim
];
extraConfigLua =
/*
lua
*/
''
local _border = "rounded"
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(
vim.lsp.handlers.hover, {
border = _border
}
)
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(
vim.lsp.handlers.signature_help, {
border = _border
}
)
vim.diagnostic.config{
float={border=_border}
};
require('lspconfig.ui.windows').default_options = {
border = _border
}
'';
}

View File

@ -0,0 +1,9 @@
{
plugins.luasnip = {
enable = true;
settings = {
enable_autosnippets = true;
store_selection_keys = "<Tab>";
};
};
}

View File

@ -0,0 +1,67 @@
{
colorschemes = {
catppuccin = {
enable = true;
settings = {
background = {
light = "macchiato";
dark = "mocha";
};
custom_highlights = ''
function(highlights)
return {
CursorLineNr = { fg = highlights.peach, style = {} },
NavicText = { fg = highlights.text },
}
end
'';
flavour = "macchiato";
no_bold = false;
no_italic = false;
no_underline = false;
transparent_background = false;
integrations = {
cmp = true;
notify = true;
gitsigns = true;
neotree = true;
which_key = true;
illuminate = {
enabled = true;
lsp = true;
};
navic = {
enabled = true;
custom_bg = "NONE";
};
treesitter = true;
telescope.enabled = true;
indent_blankline.enabled = true;
mini = {
enabled = true;
indentscope_color = "rosewater";
};
native_lsp = {
enabled = true;
inlay_hints = {
background = true;
};
virtual_text = {
errors = ["italic"];
hints = ["italic"];
information = ["italic"];
warnings = ["italic"];
ok = ["italic"];
};
underlines = {
errors = ["underline"];
hints = ["underline"];
information = ["underline"];
warnings = ["underline"];
};
};
};
};
};
};
}

View File

@ -0,0 +1,26 @@
{
plugins = {
bufferline = {
enable = true;
settings = {
options = {
diagnostics = "nvim_lsp";
mode = "buffers";
close_icon = " ";
buffer_close_icon = "󰱝 ";
modified_icon = "󰔯 ";
offsets = [
{
filetype = "neo-tree";
text = "Neo-tree";
highlight = "Directory";
text_align = "left";
}
];
};
};
};
};
}

View File

@ -0,0 +1,94 @@
{
plugins.lualine = {
enable = true;
settings = {
options = {
globalstatus = true;
extensions = [
"fzf"
"neo-tree"
];
disabledFiletypes = {
statusline = ["startup" "alpha"];
};
theme = "catppuccin";
};
sections = {
lualine_a = [
{
__unkeyed-1 = "mode";
icon = "";
}
];
lualine_b = [
{
__unkeyed-1 = "branch";
icon = "";
}
{
__unkeyed-1 = "diff";
symbols = {
added = " ";
modified = " ";
removed = " ";
};
}
];
lualine_c = [
{
__unkeyed-1 = "diagnostics";
sources = ["nvim_lsp"];
symbols = {
error = " ";
warn = " ";
info = " ";
hint = "󰝶 ";
};
}
{
__unkeyed-1 = "navic";
}
];
lualine_x = [
{
__unkeyed-1 = "filetype";
icon_only = true;
separator = "";
padding = {
left = 1;
right = 0;
};
}
{
__unkeyed-1 = "filename";
path = 1;
}
{
__unkeyed-1.__raw = ''
function()
local icon = " "
local status = require("copilot.api").status.data
return icon .. (status.message or " ")
end,
cond = function()
local ok, clients = pcall(vim.lsp.get_clients, { name = "copilot", bufnr = 0 })
return ok and #clients > 0
end,
'';
}
];
lualine_y = [
{
__unkeyed-1 = "progress";
}
];
lualine_z = [
{
__unkeyed-1 = "location";
}
];
};
};
};
}

View File

@ -0,0 +1,7 @@
{
plugins = {
web-devicons.enable = true;
which-key.enable = true;
fidget.enable = true;
};
}

View File

@ -0,0 +1,36 @@
{
plugins.telescope = {
enable = true;
extensions = {
file-browser.enable = true;
fzf-native.enable = true;
};
keymaps = {
";" = {
action = "find_files";
options.desc = "Find project files";
};
"<leader>g" = {
action = "live_grep";
options.desc = "Grep from root dir";
};
};
};
extraConfigLua =
/*
lua
*/
''
require("telescope").setup{
pickers = {
colorscheme = {
enable_preview = true
}
}
}
'';
}

View File

@ -0,0 +1,23 @@
{
plugins.toggleterm = {
enable = true;
settings = {
size = 20;
close_on_exit = false;
hide_numbers = true;
shade_terminals = true;
shading_factor = 1;
start_in_insert = true;
persist_size = true;
};
};
keymaps = [
{
mode = ["n" "i"];
key = "<c-\>";
action = "<cmd>ToggleTerm direction=horizontal<cr>";
options.desc = "Toggle Horizontal Terminal Window";
}
];
}

36
config/settings.nix Normal file
View File

@ -0,0 +1,36 @@
{
config = {
clipboard.providers.wl-copy.enable = true;
opts = {
number = true;
relativenumber = true;
clipboard = "unnamedplus";
tabstop = 2;
softtabstop = 2;
showtabline = 2;
expandtab = true;
smartindent = true;
shiftwidth = 2;
breakindent = true;
cursorline = true;
scrolloff = 8;
mouse = "a";
foldmethod = "manual";
foldenable = false;
linebreak = true;
showmode = false;
spell = false;
swapfile = false;
timeoutlen = 300;
termguicolors = true;
cmdheight = 0;
};
};
}

356
flake.lock generated Normal file
View File

@ -0,0 +1,356 @@
{
"nodes": {
"devshell": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1728330715,
"narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=",
"owner": "numtide",
"repo": "devshell",
"rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"flake-compat": {
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"revCount": 57,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1730504689,
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "506278e768c2a08bec68eb62932193e341f55c90",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1730504689,
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "506278e768c2a08bec68eb62932193e341f55c90",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"git-hooks": {
"inputs": {
"flake-compat": [
"nixvim",
"flake-compat"
],
"gitignore": "gitignore",
"nixpkgs": [
"nixvim",
"nixpkgs"
],
"nixpkgs-stable": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1730302582,
"narHash": "sha256-W1MIJpADXQCgosJZT8qBYLRuZls2KSiKdpnTVdKBuvU=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "af8a16fe5c264f5e9e18bcee2859b40a656876cf",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"nixvim",
"git-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1730633670,
"narHash": "sha256-ZFJqIXpvVKvzOVFKWNRDyIyAo+GYdmEPaYi1bZB6uf0=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "8f6ca7855d409aeebe2a582c6fd6b6a8d0bf5661",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"ixx": {
"inputs": {
"flake-utils": [
"nixvim",
"nuschtosSearch",
"flake-utils"
],
"nixpkgs": [
"nixvim",
"nuschtosSearch",
"nixpkgs"
]
},
"locked": {
"lastModified": 1729544999,
"narHash": "sha256-YcyJLvTmN6uLEBGCvYoMLwsinblXMkoYkNLEO4WnKus=",
"owner": "NuschtOS",
"repo": "ixx",
"rev": "65c207c92befec93e22086da9456d3906a4e999c",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"ref": "v0.0.5",
"repo": "ixx",
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1730600078,
"narHash": "sha256-BoyFmE59HDF3uybBySsWVoyjNuHvz3Wv8row/mSb958=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "4652874d014b82cb746173ffc64f6a70044daa7e",
"type": "github"
},
"original": {
"owner": "lnl7",
"repo": "nix-darwin",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1730531603,
"narHash": "sha256-Dqg6si5CqIzm87sp57j5nTaeBbWhHFaVyG7V6L8k3lY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "7ffd9ae656aec493492b44d0ddfb28e79a1ea25d",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1730504152,
"narHash": "sha256-lXvH/vOfb4aGYyvFmZK/HlsNsr/0CVWlwYvo2rxJk3s=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1730531603,
"narHash": "sha256-Dqg6si5CqIzm87sp57j5nTaeBbWhHFaVyG7V6L8k3lY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7ffd9ae656aec493492b44d0ddfb28e79a1ea25d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixvim": {
"inputs": {
"devshell": "devshell",
"flake-compat": "flake-compat",
"flake-parts": "flake-parts_2",
"git-hooks": "git-hooks",
"home-manager": "home-manager",
"nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs_2",
"nuschtosSearch": "nuschtosSearch",
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1730792264,
"narHash": "sha256-Ue3iywjyaNOxXgw7esVSBX3bZzM2bSPubZamYsBKIG8=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "3d24cb72618738130e6af9c644c81fe42aa34ebc",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixvim",
"type": "github"
}
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils",
"ixx": "ixx",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1730515563,
"narHash": "sha256-8lklUZRV7nwkPLF3roxzi4C2oyLydDXyAzAnDvjkOms=",
"owner": "NuschtOS",
"repo": "search",
"rev": "9e22bd742480916ff5d0ab20ca2522eaa3fa061e",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"repo": "search",
"type": "github"
}
},
"root": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs",
"nixvim": "nixvim"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1730321837,
"narHash": "sha256-vK+a09qq19QNu2MlLcvN4qcRctJbqWkX7ahgPZ/+maI=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "746901bb8dba96d154b66492a29f5db0693dbfcc",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

41
flake.nix Normal file
View File

@ -0,0 +1,41 @@
{
description = "My NeoVim configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
nixvim.url = "github:nix-community/nixvim";
};
outputs = {
nixvim,
flake-parts,
...
} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["aarch64-linux" "x86_64-linux" "aarch64-darwin" "x86_64-darwin"];
perSystem = {
system,
pkgs,
...
}: let
nixvim' = nixvim.legacyPackages.${system};
nvim = nixvim'.makeNixvimWithModule {
inherit pkgs;
module = ./config;
};
in {
checks = {
default = nixvim.lib.${system}.check.mkTestDerivationFromNvim {
inherit nvim;
name = "A nixvim configuration";
};
};
formatter = pkgs.alejandra;
packages.default = nvim;
};
};
}