Files
jory 205a1ccc8f
CI / Flake check (aarch64-linux) (push) Successful in 1m30s
CI / Flake check (x86_64-linux) (push) Successful in 1m17s
CI / Pre-commit checks (x86_64-linux) (push) Failing after 19s
feat(github): add auto-conventional-commit hook with opencode integration
- Add prepare-commit-msg git hook that generates conventional commit messages
- Modularize fish configuration with separate conf.d files
- Convert configuration files from .text to .source format for structured data
- Add sops-nix SOPS configuration with explicit secret definitions
- Upgrade age identity to single key file management approach
- Add system activation script for age key management
- Generate .sops.yaml for SOPS creation rules
- Restructure README.md with improved table and cleaner formatting
- Refactor config files to use pkgs.formats.json/toml generators
- Implement YAML format for ashell and walker service configurations
- Update SSH config source to use sops secrets
- Convert zed and other config files to use structured .source format
2026-07-12 17:55:52 +02:00

146 lines
4.9 KiB
Nix

{pkgs, ...}: let
languages = import ./_languages.nix {inherit pkgs;};
providers = import ./_providers.nix;
skills = import ./_skills.nix {inherit pkgs;};
inherit (pkgs) opencode;
opencodeEnv = pkgs.buildEnv {
name = "opencode-env";
paths = languages.packages ++ skills.packages;
};
opencodeInitScript = pkgs.writeShellScript "opencode-init" ''
mkdir -p "$HOME/.local/cache/opencode/node_modules/@opencode-ai"
mkdir -p "$HOME/.config/opencode/node_modules/@opencode-ai"
if [ -d "$HOME/.config/opencode/node_modules/@opencode-ai/plugin" ]; then
if [ ! -L "$HOME/.local/cache/opencode/node_modules/@opencode-ai/plugin" ]; then
ln -sf "$HOME/.config/opencode/node_modules/@opencode-ai/plugin" \
"$HOME/.local/cache/opencode/node_modules/@opencode-ai/plugin"
fi
fi
exec ${opencode}/bin/opencode "$@"
'';
opencodeWrapped =
pkgs.runCommand "opencode-wrapped" {
buildInputs = [pkgs.makeWrapper];
} ''
mkdir -p $out/bin
makeWrapper ${opencodeInitScript} $out/bin/opencode \
--prefix PATH : ${opencodeEnv}/bin \
--prefix LD_LIBRARY_PATH : "${pkgs.lib.makeLibraryPath [pkgs.stdenv.cc.cc.lib]}"
'';
configFile = "opencode/config.json";
tuiFile = "opencode/tui.json";
toJSON = (pkgs.formats.json {}).generate;
in {
users.users.someone.packages = [
opencodeWrapped
];
xdg.configFile = {
"${configFile}".source = toJSON "config.json" {
"$schema" = "https://opencode.ai/config.json";
plugin = [
"opencode-antigravity-auth@latest"
"@tarquinen/opencode-dcp@latest"
"oh-my-openagent@latest"
];
model = "google/antigravity-gemini-3-flash";
small_model = "opencode/big-pickle";
autoupdate = false;
agent = {
build = {model = "opencode/nemotron-3-super-free";};
plan = {model = "opencode/big-pickle";};
task = {model = "opencode/nemotron-3-super-free";};
"sisyphus-junior" = {model = "opencode/nemotron-3-super-free";};
explore = {model = "opencode/minimax-m2.5-free";};
general = {model = "opencode/big-pickle";};
oracle = {model = "opencode/nemotron-3-super-free";};
"ultrabrain" = {model = "opencode/nemotron-3-super-free";};
"deep" = {model = "opencode/nemotron-3-super-free";};
"quick" = {model = "opencode/gpt-5-nano";};
"artistry" = {model = "opencode/nemotron-3-super-free";};
"visual-engineering" = {model = "opencode/hy3-preview-free";};
"writing" = {model = "opencode/hy3-preview-free";};
};
share = "disabled";
disabled_providers = [
"amazon-bedrock"
"anthropic"
"azure-openai"
"azure-cognitive-services"
"baseten"
"cerebras"
"cloudflare-ai-gateway"
"cortecs"
"deep-infra"
"fireworks-ai"
"google-vertex-ai"
"groq"
"hugging-face"
"helicone"
"llama.cpp"
"io-net"
"lmstudio"
"moonshot-ai"
"nebius-token-factory"
"ollama"
"ollama-cloud"
"openai"
"sap-ai-core"
"ovhcloud-ai-endpoints"
"together-ai"
"venice-ai"
"xai"
"zai"
"zenmux"
];
enabled_providers = ["opencode" "google" "openrouter" "deepseek" "nvidia" "alibaba" "mistral" "cloudflare-workers-ai"];
mcp = {
gh_grep = {
type = "remote";
url = "https://mcp.grep.app/";
enabled = true;
timeout = 10000;
};
deepwiki = {
type = "remote";
url = "https://mcp.deepwiki.com/mcp";
enabled = true;
timeout = 10000;
};
context7 = {
type = "remote";
url = "https://mcp.context7.com/mcp";
enabled = true;
timeout = 10000;
};
};
inherit (languages) formatter lsp;
provider = providers.config;
};
"opencode/oh-my-openagent.json".source = toJSON "oh-my-openagent.json" {
"$schema" = "https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/master/assets/oh-my-opencode.schema.json";
agents = {
"sisyphus-junior" = {model = "opencode/nemotron-3-super-free";};
};
categories = {
"quick" = {model = "opencode/gpt-5-nano";};
"ultrabrain" = {model = "opencode/nemotron-3-super-free";};
"deep" = {model = "opencode/nemotron-3-super-free";};
"visual-engineering" = {model = "opencode/hy3-preview-free";};
"writing" = {model = "opencode/hy3-preview-free";};
"unspecified-low" = {model = "opencode/gpt-5-nano";};
"unspecified-high" = {model = "opencode/nemotron-3-super-free";};
};
};
"${tuiFile}".source = toJSON "tui.json" {
"$schema" = "https://opencode.ai/tui.json";
theme = "gruvbox";
};
"opencode/skill".source = skills.skillsSource + "/skill";
};
}