diff --git a/hosts/macos/home.nix b/hosts/macos/home.nix index e454ad0..fd43fa8 100644 --- a/hosts/macos/home.nix +++ b/hosts/macos/home.nix @@ -10,6 +10,9 @@ in commonHome // { # Refer to the nixOS host for info about home-manager # inherit commonHome; + imports = [ + (import ../../common/ai.nix { gpu = "metal"; }) + ]; home.stateVersion = "25.11"; # Allow unfree packages diff --git a/hosts/nixos/home.nix b/hosts/nixos/home.nix index 2bc5ea6..156bf7f 100644 --- a/hosts/nixos/home.nix +++ b/hosts/nixos/home.nix @@ -12,6 +12,7 @@ commonHome // { # manage. imports = [ ../../modules/home-manager/hyprland.nix + (import ../../modules/common/ai.nix { gpu = "cuda"; }) ]; # This value determines the Home Manager release that your configuration is # compatible with. This helps avoid breakage when a new Home Manager release diff --git a/modules/common/ai.nix b/modules/common/ai.nix index 4945703..4e205c1 100644 --- a/modules/common/ai.nix +++ b/modules/common/ai.nix @@ -1,8 +1,14 @@ +{ gpu ... }: + { services = { ollama = { enable = true; - loadModels = [ "" "" ]; + loadModels = [ "codegemma:7b-instruct" "codegemma:7b-code" "codegemma:2b" "starcoder2:7b" ]; + acceleration = gpu; + }; + open-webui = { + enable = true; }; };