This commit is contained in:
Generated
+17
@@ -17,6 +17,22 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"crush-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1787663326,
|
||||
"narHash": "sha256-oRdPES6UCXStpGNT2om13b0wzh6LvpmydTW2wJkPkUs=",
|
||||
"owner": "joestump-agent",
|
||||
"repo": "crush",
|
||||
"rev": "0da593afacf2b8639cdd57cd0f6d106448438116",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "joestump-agent",
|
||||
"repo": "crush",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -276,6 +292,7 @@
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"crush-src": "crush-src",
|
||||
"darwin": "darwin",
|
||||
"fw_nix": "fw_nix",
|
||||
"git-hooks": "git-hooks_2",
|
||||
|
||||
@@ -28,6 +28,10 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
jail-nix.url = "sourcehut:~alexdavid/jail.nix";
|
||||
crush-src = {
|
||||
url = "github:joestump-agent/crush";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
@@ -87,7 +91,10 @@
|
||||
pkgs = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
extraSpecialArgs.primaryUser = homeManagerUser;
|
||||
extraSpecialArgs = {
|
||||
primaryUser = homeManagerUser;
|
||||
inherit (inputs) crush-src;
|
||||
};
|
||||
modules = [
|
||||
inputs.fw_nix.nixosModules.identities
|
||||
vscode-server.homeModules.default
|
||||
|
||||
+22
-1
@@ -2,6 +2,7 @@
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
crush-src,
|
||||
...
|
||||
}:
|
||||
let
|
||||
@@ -27,7 +28,11 @@ in
|
||||
yt-dlp
|
||||
attic-client
|
||||
opencode
|
||||
crush
|
||||
((crush.override { buildGo126Module = pkgs.buildGo127Module; }).overrideAttrs (_: {
|
||||
src = crush-src;
|
||||
version = crush-src.shortRev or "dirty";
|
||||
vendorHash = "sha256-B29pB157+SZS60ZOtg/UHRt7OYcmfnqeKxqH+eP7BwY=";
|
||||
}))
|
||||
];
|
||||
|
||||
systemd.user.mounts."${haremote-unit}" = {
|
||||
@@ -47,6 +52,22 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.signal-cli = {
|
||||
Unit = {
|
||||
Description = "signal-cli daemon";
|
||||
After = [ "network-online.target" ];
|
||||
Wants = [ "network-online.target" ];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.signal-cli}/bin/signal-cli daemon --tcp 127.0.0.1:7583 --receive-mode on-start --no-receive-stdout";
|
||||
Restart = "always";
|
||||
RestartSec = "10s";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "default.target" ];
|
||||
};
|
||||
};
|
||||
|
||||
programs.zsh.loginExtra = ''
|
||||
if [ -n "$SSH_AUTH_SOCK" ]; then
|
||||
mkdir -p ${haremote-path}
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
{
|
||||
"$schema": "https://charm.land/crush.json",
|
||||
"options": {
|
||||
"disable_metrics": true
|
||||
},
|
||||
"providers": {
|
||||
"crush": {
|
||||
"disable": true
|
||||
},
|
||||
"exa": {
|
||||
"disable": true
|
||||
},
|
||||
"local-ollama": {
|
||||
"type": "openai-compat",
|
||||
"base_url": "http://ollama.home.arpa:11434/v1",
|
||||
"api_key": "ollama",
|
||||
"models": [
|
||||
{
|
||||
"id": "gemma4-1gpu",
|
||||
"name": "gemma4-1gpu",
|
||||
"context_window": 48000,
|
||||
"cost_per_1m_in": 0,
|
||||
"cost_per_1m_out": 0,
|
||||
"cost_per_1m_in_cached": 0,
|
||||
"cost_per_1m_out_cached": 0,
|
||||
"default_max_tokens": 8192,
|
||||
"can_reason": true,
|
||||
"supports_attachments": true
|
||||
},
|
||||
{
|
||||
"id": "qwen3.6-1gpu",
|
||||
"name": "qwen3.6-1gpu",
|
||||
"context_window": 128000,
|
||||
"cost_per_1m_in": 0,
|
||||
"cost_per_1m_out": 0,
|
||||
"cost_per_1m_in_cached": 0,
|
||||
"cost_per_1m_out_cached": 0,
|
||||
"default_max_tokens": 8192,
|
||||
"can_reason": true,
|
||||
"supports_attachments": true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"models": {
|
||||
"default": {
|
||||
"provider": "local-ollama",
|
||||
"model": "qwen3.6-1gpu",
|
||||
"think": true
|
||||
}
|
||||
},
|
||||
"mcp": {
|
||||
"nix": {
|
||||
"type": "stdio",
|
||||
"command": "nix",
|
||||
"args": [
|
||||
"run",
|
||||
"github:utensils/mcp-nixos",
|
||||
"--"
|
||||
]
|
||||
},
|
||||
"gitea": {
|
||||
"type": "stdio",
|
||||
"command": "nix",
|
||||
"args": [
|
||||
"run",
|
||||
"nixpkgs#gitea-mcp-server",
|
||||
"--"
|
||||
]
|
||||
},
|
||||
"ha": {
|
||||
"type": "stdio",
|
||||
"command": "nix",
|
||||
"args": [
|
||||
"shell",
|
||||
"nixpkgs#uv",
|
||||
"nixpkgs#python3",
|
||||
"--command",
|
||||
"uv",
|
||||
"tool",
|
||||
"run",
|
||||
"ha-mcp"
|
||||
],
|
||||
"env": {
|
||||
"UV_PYTHON_DOWNLOADS": "never",
|
||||
"UV_PYTHON_PREFERENCE": "system"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
option metrics false
|
||||
|
||||
provider add crush --disable true
|
||||
provider add exa --disable true
|
||||
|
||||
provider add local-ollama \
|
||||
--type openai-compat \
|
||||
--base-url "http://ollama.home.arpa:11434/v1" \
|
||||
--api-key "ollama"
|
||||
|
||||
model add local-ollama/gemma-large-1gpu \
|
||||
--name "gemma-large-1gpu" \
|
||||
--context-window 48000 \
|
||||
--default-max-tokens 8192 \
|
||||
--can-reason true \
|
||||
--supports-images true
|
||||
|
||||
model add local-ollama/qwen-small-1gpu \
|
||||
--name "qwen-small-1gpu" \
|
||||
--context-window 128000 \
|
||||
--default-max-tokens 8192 \
|
||||
--can-reason true \
|
||||
--supports-images true
|
||||
|
||||
model add local-ollama/qwen-large-1gpu \
|
||||
--name "qwen-large-1gpu" \
|
||||
--context-window 128000 \
|
||||
--default-max-tokens 8192 \
|
||||
--can-reason true \
|
||||
--supports-images true
|
||||
|
||||
model small local-ollama/qwen-small-1gpu
|
||||
model large local-ollama/qwen-large-1gpu --think
|
||||
|
||||
mcp add nix \
|
||||
--disabled false \
|
||||
--type stdio \
|
||||
--command "nix" \
|
||||
--args "run" \
|
||||
--args "github:utensils/mcp-nixos" \
|
||||
--args "--"
|
||||
|
||||
# Uses GITEA_HOST, GITEA_ACCESS_TOKEN
|
||||
mcp add gitea \
|
||||
--disabled false \
|
||||
--type stdio \
|
||||
--command "nix" \
|
||||
--args "run" \
|
||||
--args "nixpkgs#gitea-mcp-server" \
|
||||
--args "--"
|
||||
|
||||
# Uses HOMEASSISTANT_URL, HOMEASSISTANT_TOKEN
|
||||
mcp add ha \
|
||||
--disabled false \
|
||||
--type stdio \
|
||||
--command "nix" \
|
||||
--args "shell" \
|
||||
--args "nixpkgs#uv" \
|
||||
--args "nixpkgs#python3" \
|
||||
--args "--command" \
|
||||
--args "uv" \
|
||||
--args "tool" \
|
||||
--args "run" \
|
||||
--args "ha-mcp" \
|
||||
--env UV_PYTHON_DOWNLOADS "never" \
|
||||
--env UV_PYTHON_PREFERENCE "system"
|
||||
|
||||
# Uses SIGNAL_MCP_ACCOUNT, SIGNAL_MCP_OPERATOR, SIGNAL_MCP_TRUSTED_SENDERS
|
||||
# Have to do a "bash -c" workaround because a bug in crush duplicates all args,
|
||||
# breaking the command line.
|
||||
mcp add signal \
|
||||
--disabled false \
|
||||
--type stdio \
|
||||
--command "bash" \
|
||||
--args "-c" \
|
||||
--args 'nix shell nixpkgs#uv nixpkgs#python3 --command uvx -q --from git+https://github.com/joestump/signal-mcp signal-mcp --transport stdio --channel' \
|
||||
--env UV_PYTHON_DOWNLOADS "never" \
|
||||
--env UV_PYTHON_PREFERENCE "system"
|
||||
|
||||
# TODO: in YOLO mode we shouldn't need these, right?
|
||||
permissions allow mcp_signal_send_message_to_user mcp_nix_nix
|
||||
|
||||
# vim: ft=bash
|
||||
Reference in New Issue
Block a user