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,11 +9,20 @@
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 [
(lib.mkIf (config.neovim.dotfiles != null) {
xdg.configFile."nvim".source = config.neovim.dotfiles;
})
{
programs.neovim = { programs.neovim = {
enable = true; enable = true;
vimAlias = true; vimAlias = true;
@@ -55,5 +64,7 @@
"${lib.makeLibraryPath [ pkgs.stdenv.cc.cc.lib ]}" "${lib.makeLibraryPath [ pkgs.stdenv.cc.cc.lib ]}"
]; ];
}; };
}; }
]
);
} }