feat: add option for dotfile linking for neovim

This commit is contained in:
2026-03-07 21:09:42 +01:00
parent 552196c3f9
commit 842479d4e7
3 changed files with 56 additions and 39 deletions

View File

@@ -32,6 +32,9 @@ in
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-medium.yaml"; base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-medium.yaml";
}; };
# neovim manages its own theme
home-manager.users.matej.stylix.targets.neovim.enable = false;
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;

View File

@@ -34,6 +34,9 @@
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-medium.yaml"; base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-medium.yaml";
}; };
# neovim manages its own theme
home-manager.users.matej.stylix.targets.neovim.enable = false;
# lanzaboote secure boot # lanzaboote secure boot
boot.kernelParams = [ "btusb.reset=1" ]; boot.kernelParams = [ "btusb.reset=1" ];
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;

View File

@@ -9,51 +9,62 @@
neovim = { neovim = {
enable = lib.mkEnableOption "neovim nightly with lsp support"; enable = lib.mkEnableOption "neovim nightly with lsp support";
package = lib.mkPackageOption pkgs "neovim" { }; package = lib.mkPackageOption pkgs "neovim" { };
dotfiles = lib.mkOption {
type = lib.types.nullOr lib.types.path;
default = null;
description = "path to neovim config directory";
};
}; };
}; };
config = lib.mkIf config.neovim.enable { config = lib.mkIf config.neovim.enable (
stylix.targets.neovim.enable = false; lib.mkMerge [
programs.neovim = { (lib.mkIf (config.neovim.dotfiles != null) {
enable = true; xdg.configFile."nvim".source = config.neovim.dotfiles;
vimAlias = true; })
defaultEditor = true; {
inherit (config.neovim) package; programs.neovim = {
enable = true;
vimAlias = true;
defaultEditor = true;
inherit (config.neovim) package;
extraPackages = with pkgs; [ extraPackages = with pkgs; [
# runtime deps # runtime deps
gcc gcc
luajit luajit
nodejs_22 nodejs_22
tree-sitter tree-sitter
gnumake gnumake
osc osc
# search and diff # search and diff
fd fd
ripgrep ripgrep
bat bat
delta delta
# language servers # language servers
pyright pyright
typescript-language-server typescript-language-server
lua-language-server lua-language-server
gopls gopls
nil nil
nixd nixd
# formatters # formatters
nixpkgs-fmt nixpkgs-fmt
stylua stylua
]; ];
extraWrapperArgs = [ extraWrapperArgs = [
"--suffix" "--suffix"
"LD_LIBRARY_PATH" "LD_LIBRARY_PATH"
":" ":"
"${lib.makeLibraryPath [ pkgs.stdenv.cc.cc.lib ]}" "${lib.makeLibraryPath [ pkgs.stdenv.cc.cc.lib ]}"
]; ];
}; };
}; }
]
);
} }