feat: a better neovim configuration

This commit is contained in:
Teesh 2026-01-30 15:44:25 +02:00
parent efe75fe3b6
commit 3ce466520d
10 changed files with 99 additions and 162 deletions

140
flake.lock generated
View file

@ -106,22 +106,6 @@
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1751685974,
"narHash": "sha256-NKw96t+BgHIYzHUjkTK95FqYRVKB8DHpVhefWSz/kTw=",
"ref": "refs/heads/main",
"rev": "549f2762aebeff29a2e5ece7a7dc0f955281a1d1",
"revCount": 92,
"type": "git",
"url": "https://git.lix.systems/lix-project/flake-compat.git"
},
"original": {
"type": "git",
"url": "https://git.lix.systems/lix-project/flake-compat.git"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
@ -143,27 +127,6 @@
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"nvf",
"nixpkgs"
]
},
"locked": {
"lastModified": 1768135262,
"narHash": "sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "80daad04eddbbf5a4d883996a73f3f542fa437ac",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": [
"stylix",
@ -184,6 +147,24 @@
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"fromYaml": {
"flake": false,
"locked": {
@ -255,44 +236,42 @@
"type": "github"
}
},
"mnw": {
"locked": {
"lastModified": 1768701608,
"narHash": "sha256-kSvWF3Xt2HW9hmV5V7i8PqeWJIBUKmuKoHhOgj3Znzs=",
"owner": "Gerg-L",
"repo": "mnw",
"rev": "20d63a8a1ae400557c770052a46a9840e768926b",
"type": "github"
},
"original": {
"owner": "Gerg-L",
"repo": "mnw",
"type": "github"
}
},
"ndg": {
"lazyvim": {
"inputs": {
"nixpkgs": [
"nvf",
"nixpkgs"
]
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1768214250,
"narHash": "sha256-hnBZDQWUxJV3KbtvyGW5BKLO/fAwydrxm5WHCWMQTbw=",
"owner": "feel-co",
"repo": "ndg",
"rev": "a6bd3c1ce2668d096e4fdaaa03ad7f03ba1fbca8",
"lastModified": 1769461069,
"narHash": "sha256-6igcc1gI+3rxmRJTtqabdPK9srTjbCeMOgmjZI8aZQw=",
"owner": "pfassina",
"repo": "lazyvim-nix",
"rev": "2a9e612e6f30cd16e70f943d9c2ff0fd290ed646",
"type": "github"
},
"original": {
"owner": "feel-co",
"ref": "refs/tags/v2.6.0",
"repo": "ndg",
"owner": "pfassina",
"repo": "lazyvim-nix",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1752480373,
"narHash": "sha256-JHQbm+OcGp32wAsXTE/FLYGNpb+4GLi5oTvCxwSoBOA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "62e0f05ede1da0d54515d4ea8ce9c733f12d9f08",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1769598131,
"narHash": "sha256-e7VO/kGLgRMbWtpBqdWl0uFg8Y2XWFMdz0uUJvlML8o=",
@ -333,39 +312,14 @@
"type": "github"
}
},
"nvf": {
"inputs": {
"flake-compat": "flake-compat",
"flake-parts": "flake-parts_2",
"mnw": "mnw",
"ndg": "ndg",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems"
},
"locked": {
"lastModified": 1769716128,
"narHash": "sha256-CAsiyTNjI0WmtJstw3kGyL7Q1jPCn7AsO6Ms47G+x3w=",
"owner": "notashelf",
"repo": "nvf",
"rev": "866b983c4047b87bcdca6ab3673ed7bd602f0251",
"type": "github"
},
"original": {
"owner": "notashelf",
"repo": "nvf",
"type": "github"
}
},
"root": {
"inputs": {
"firefox-addons": "firefox-addons",
"flake-parts": "flake-parts",
"home-manager": "home-manager",
"import-tree": "import-tree",
"nixpkgs": "nixpkgs",
"nvf": "nvf",
"lazyvim": "lazyvim",
"nixpkgs": "nixpkgs_2",
"stylix": "stylix"
}
},
@ -376,7 +330,7 @@
"base16-helix": "base16-helix",
"base16-vim": "base16-vim",
"firefox-gnome-theme": "firefox-gnome-theme",
"flake-parts": "flake-parts_3",
"flake-parts": "flake-parts_2",
"gnome-shell": "gnome-shell",
"nixpkgs": [
"nixpkgs"

View file

@ -15,9 +15,8 @@
stylix.url = "github:nix-community/stylix/release-25.11";
stylix.inputs.nixpkgs.follows = "nixpkgs";
nvf = {
url = "github:notashelf/nvf";
inputs.nixpkgs.follows = "nixpkgs";
lazyvim = {
url = "github:pfassina/lazyvim-nix";
};
firefox-addons = {

43
modules/base/neovim.nix Normal file
View file

@ -0,0 +1,43 @@
{ inputs, ... }:
{
flake.modules.nixos.base = { pkgs, ... }: {
environment.systemPackages = [ pkgs.neovim pkgs.statix ];
};
flake.modules.homeManager.base = {
imports = [ inputs.lazyvim.homeManagerModules.default ];
programs.lazyvim = {
enable = true;
pluginSource = "nixpkgs";
plugins.catppuccin = ''
return { "LazyVim/LazyVim", opts = { colorscheme = "catppuccin" } }
'';
plugins.neogit = ''
return { "NeogitOrg/neogit", opts = {}, keys = { { "<leader>gg", "<cmd>Neogit<cr>" } } }
'';
extras = {
lang.nix = {
enable = true;
installDependencies = true;
};
lang.python = {
enable = true;
installDependencies = true;
};
# only reason we don't add `pkgs.claude-code` to base is because base is meant to be things for servers,
# we do need neovim on the server but we don't need a clanker on there too!
#
# plus, it can fail gracefully - if cc is not installed, it simply does nothing
ai.claudecode = {
enable = true;
installDependencies = true;
installRuntimeDependencies = true;
};
};
};
};
}

View file

@ -1,10 +0,0 @@
{ ... }:
{
flake.modules.generic.neovim = {
vim.autocomplete.blink-cmp = {
enable = true;
friendly-snippets.enable = true;
};
};
}

View file

@ -1,14 +0,0 @@
{ ... }:
{
flake.modules.generic.neovim = {
vim.languages = {
python.enable = true;
rust.enable = true;
nix.enable = true;
clang.enable = true;
};
vim.lsp.enable = true;
};
}

View file

@ -1,7 +0,0 @@
{ ... }:
{
flake.modules.generic.neovim = {
vim.statusline.lualine.enable = true;
};
}

View file

@ -1,16 +0,0 @@
{ ... }:
{
flake.modules.generic.neovim = { pkgs, ... }: {
vim.lazy.plugins.neogit = {
package = pkgs.vimPlugins.neogit;
setupModule = "neogit";
setupOpts = {};
keys = [
{ mode = "n"; key = "<leader>gg"; action = "<cmd>Neogit<cr>"; }
];
};
};
}

View file

@ -1,12 +0,0 @@
{ inputs, config, ... }:
{
flake.modules.nixos.base = {
imports = [ inputs.nvf.nixosModules.default ];
programs.nvf = {
enable = true;
settings = config.flake.modules.generic.neovim;
};
};
}

View file

@ -1,7 +0,0 @@
{ ... }:
{
flake.modules.generic.neovim = {
vim.theme.enable = true;
};
}

View file

@ -0,0 +1,7 @@
{ ... }:
{
flake.modules.nixos.desktop = { pkgs, ... }: {
environment.systemPackages = [ pkgs.claude-code ];
};
}