Use unstable ollama-cuda and pin gemma4:e4b
This commit is contained in:
parent
2e5565d2de
commit
a72accde1a
4 changed files with 47 additions and 5 deletions
19
flake.lock
generated
19
flake.lock
generated
|
|
@ -179,6 +179,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1775710090,
|
||||
"narHash": "sha256-ar3rofg+awPB8QXDaFJhJ2jJhu+KqN/PRCXeyuXR76E=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4c1018dae018162ec878d42fec712642d214fdfa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1767364772,
|
||||
|
|
@ -232,7 +248,8 @@
|
|||
"agenix": "agenix",
|
||||
"home-manager": "home-manager_2",
|
||||
"nix-openclaw": "nix-openclaw",
|
||||
"nixpkgs": "nixpkgs_4"
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
|
|
|
|||
15
flake.nix
15
flake.nix
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-25.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
@ -11,7 +12,7 @@
|
|||
nix-openclaw.url = "github:openclaw/nix-openclaw";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, agenix, nix-openclaw, ... }:
|
||||
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, agenix, nix-openclaw, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
in {
|
||||
|
|
@ -21,7 +22,17 @@
|
|||
modules = [
|
||||
./hosts/Nixos/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
{ nixpkgs.overlays = [ nix-openclaw.overlays.default ]; }
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
nix-openclaw.overlays.default
|
||||
(final: prev: {
|
||||
unstable = import nixpkgs-unstable {
|
||||
inherit system;
|
||||
config = prev.config;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
|
|
|
|||
|
|
@ -349,7 +349,7 @@
|
|||
id = "OPENCLAW_GATEWAY_TOKEN";
|
||||
};
|
||||
|
||||
agents.defaults.model.primary = "ollama/qwen2.5:3b";
|
||||
agents.defaults.model.primary = "ollama/gemma4:e4b";
|
||||
models.providers.ollama = {
|
||||
baseUrl = "http://127.0.0.1:11434";
|
||||
api = "ollama";
|
||||
|
|
|
|||
|
|
@ -43,6 +43,14 @@
|
|||
};
|
||||
};
|
||||
|
||||
nix.settings = {
|
||||
# CUDA builds are heavy; use a binary cache to avoid local compilation.
|
||||
substituters = lib.mkAfter [ "https://cache.nixos-cuda.org" ];
|
||||
trusted-public-keys = lib.mkAfter [
|
||||
"cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M="
|
||||
];
|
||||
};
|
||||
|
||||
powerManagement.cpuFreqGovernor = "performance";
|
||||
# Bootloader.
|
||||
boot = {
|
||||
|
|
@ -248,10 +256,16 @@
|
|||
};
|
||||
ollama = {
|
||||
enable = true;
|
||||
# Nixpkgs' plain `ollama` is typically CPU-only; use the CUDA variant on NVIDIA.
|
||||
package = pkgs.unstable.ollama-cuda;
|
||||
acceleration = "cuda";
|
||||
host = "[::]";
|
||||
environmentVariables = {
|
||||
# Lower default context to keep KV cache smaller (faster + more likely to stay on GPU).
|
||||
OLLAMA_CONTEXT_LENGTH = "8192";
|
||||
};
|
||||
loadModels = [
|
||||
"qwen2.5:3b"
|
||||
"gemma4:e4b"
|
||||
];
|
||||
syncModels = true;
|
||||
# listenAddress = "10.0.0.2:11434";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue