Compare commits
No commits in common. "72204b98174748d22b385b82c8ade345006be098" and "8036d54fcd4ff000da9257654a1cdfaa42e2e140" have entirely different histories.
72204b9817
...
8036d54fcd
@ -44,10 +44,6 @@ in
|
|||||||
# };
|
# };
|
||||||
#};
|
#};
|
||||||
|
|
||||||
services.ollama = {
|
|
||||||
enable = true;
|
|
||||||
user="zaphar";
|
|
||||||
};
|
|
||||||
services.my-lorri.enable = true;
|
services.my-lorri.enable = true;
|
||||||
services.durnitisp.enable = true;
|
services.durnitisp.enable = true;
|
||||||
services.node-exporter.enable = true;
|
services.node-exporter.enable = true;
|
||||||
|
@ -369,8 +369,6 @@ EOF";
|
|||||||
victoriametrics
|
victoriametrics
|
||||||
# TODO add sonic-pi here if it supports the arch
|
# TODO add sonic-pi here if it supports the arch
|
||||||
unstablePkgs.dbeaver-bin
|
unstablePkgs.dbeaver-bin
|
||||||
postgresql
|
|
||||||
unstablePkgs.ollama
|
|
||||||
])
|
])
|
||||||
#++ (with pkgs.ocamlPackages; [
|
#++ (with pkgs.ocamlPackages; [
|
||||||
# dune_3
|
# dune_3
|
||||||
@ -399,7 +397,6 @@ EOF";
|
|||||||
./modules/victoria-logs.nix
|
./modules/victoria-logs.nix
|
||||||
./modules/vector.nix
|
./modules/vector.nix
|
||||||
./modules/lorri.nix
|
./modules/lorri.nix
|
||||||
./modules/ollama.nix
|
|
||||||
./darwin-configuration.nix
|
./darwin-configuration.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
@ -672,11 +672,11 @@ require('copilot').setup();
|
|||||||
|
|
||||||
require('avante').setup ({
|
require('avante').setup ({
|
||||||
provider = "copilot",
|
provider = "copilot",
|
||||||
claude = {
|
openai = {
|
||||||
endpoint = "https://api.anthropic.com",
|
model = "Claude Sonnet 3.7", -- your desired model (or use gpt-4o, etc.)
|
||||||
model = "claude-3-7-sonnet-20250219",
|
timeout = 30000, -- Timeout in milliseconds, increase this for reasoning models
|
||||||
timeout = 30000, -- Timeout in milliseconds
|
|
||||||
temperature = 0,
|
temperature = 0,
|
||||||
max_tokens = 20480,
|
max_tokens = 8192, -- Increase this to include reasoning tokens (for reasoning models)
|
||||||
};
|
--reasoning_effort = "medium", -- low|medium|high, only used for reasoning models
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
@ -1,56 +0,0 @@
|
|||||||
{pkgs, lib, config, ...}:
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
mkLauncher = import ../../packages/darwin-launcher.nix { inherit pkgs; };
|
|
||||||
ollamaLauncher = mkLauncher ''
|
|
||||||
exec ${pkgs.clio}/bin/clio \
|
|
||||||
--out-path=${config.services.ollama.stdoutPath} \
|
|
||||||
--err-path=${config.services.ollama.stdoutPath} \
|
|
||||||
--pid-file=${config.services.ollama.pidPath} \
|
|
||||||
--paranoid \
|
|
||||||
-- \
|
|
||||||
${pkgs.ollama}/bin/ollama \
|
|
||||||
serve
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.services.ollama = {
|
|
||||||
enable = mkEnableOption "Enable the ollama agent";
|
|
||||||
stdoutPath = mkOption {
|
|
||||||
default = "/Users/${config.services.ollama.user}/config/ollama/out.log";
|
|
||||||
};
|
|
||||||
stderrPath = mkOption {
|
|
||||||
default = "/Users/${config.services.ollama.user}/config/ollama/err.log";
|
|
||||||
};
|
|
||||||
pidPath = mkOption {
|
|
||||||
default = "/Users/${config.services.ollama.user}/config/ollama/ollama.pid";
|
|
||||||
};
|
|
||||||
user = mkOption {
|
|
||||||
default="zaphar";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
|
||||||
|
|
||||||
launchd.user.agents.ollama = mkIf config.services.ollama.enable {
|
|
||||||
serviceConfig = {
|
|
||||||
ProgramArguments = [
|
|
||||||
"${ollamaLauncher}"
|
|
||||||
];
|
|
||||||
EnvironmentVariables = {
|
|
||||||
"OLLAMA_HOST" = "127.0.0.1:11434";
|
|
||||||
"OLLAMA_MODELS" = "/Users/${config.services.ollama.user}/config/ollama/";
|
|
||||||
};
|
|
||||||
RunAtLoad = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.etc."newsyslog.d/org.nixos.ollama.conf" = mkIf config.services.ollama.enable {
|
|
||||||
text = ''
|
|
||||||
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
|
|
||||||
${config.services.ollama.stdoutPath} zaphar:staff 644 10 1000 * BJ ${config.services.ollama.pidPath} 1
|
|
||||||
${config.services.ollama.stderrPath} zaphar:staff 644 10 1000 * BJ ${config.services.ollama.pidPath} 1
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -44,5 +44,4 @@ function disk_usage() {
|
|||||||
|
|
||||||
eval "$(direnv hook zsh)"
|
eval "$(direnv hook zsh)"
|
||||||
|
|
||||||
export ANTHROPIC_API_KEY="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"
|
|
||||||
export OPENAI_API_KEY="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"
|
export OPENAI_API_KEY="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"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user