From efe37836bd4261471d4ab87aea13da6bb97c3b9e Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 16 Jan 2025 20:25:32 -0300 Subject: [PATCH] fix(neovim): better default for ollama and disable neovim in the module Of course, enable neovim in the desktop and laptop configs --- modules/home-manager/programs/neovim/default.nix | 8 ++++++-- specific/desktop/home-manager.nix | 4 ++++ specific/laptop/home-manager.nix | 9 +++++++-- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/modules/home-manager/programs/neovim/default.nix b/modules/home-manager/programs/neovim/default.nix index 224c365..c3488e3 100644 --- a/modules/home-manager/programs/neovim/default.nix +++ b/modules/home-manager/programs/neovim/default.nix @@ -8,7 +8,12 @@ let inherit (lib) types mkOption; ollamaPackage = - if config.programs.neovim.ollama.type == "amd" then pkgs.ollama-rocm else pkgs.ollama-cuda; + if config.programs.neovim.ollama.type == "amd" then + pkgs.ollama-rocm + else if config.programs.neovim.ollama.type == "nvidia" then + pkgs.ollama-cuda + else + pkgs.ollama; in { options.programs.neovim = { @@ -41,7 +46,6 @@ in config = { programs.neovim = { - enable = true; withNodeJs = true; withPython3 = true; diff --git a/specific/desktop/home-manager.nix b/specific/desktop/home-manager.nix index 18201c4..3cd7a67 100644 --- a/specific/desktop/home-manager.nix +++ b/specific/desktop/home-manager.nix @@ -117,6 +117,10 @@ # MODULES # # + programs.neovim = { + enable = true; + }; + modules.hyprland = { # Enable scripts scripts = { diff --git a/specific/laptop/home-manager.nix b/specific/laptop/home-manager.nix index dd25a51..ae2073f 100644 --- a/specific/laptop/home-manager.nix +++ b/specific/laptop/home-manager.nix @@ -106,8 +106,13 @@ # MODULES # # - # Set the hostname for nixd in neovim - programs.neovim.nixd.hostname = "wizlap"; + # Enable neovim + programs.neovim = { + enable = true; + + # Set the hostname for nixd in neovim + nixd.hostname = "wizlap"; + }; # Add monitor configuration to hyprland modules.hyprland = {