This commit is contained in:
Lennart J. Kurzweg (Nx2)
2025-12-03 01:59:12 +01:00
parent 5d65da4fca
commit edda49ee66
27 changed files with 235 additions and 267 deletions

View File

@@ -1,29 +1,60 @@
{ pkgs, ... }@all: with all; {
home = {
packages = with pkgs; [
unstable.opencode
];
# file.".config/opencode/opencode.json".text = let
# model = "qwen2.5-coder:7b";
# in builtins.toJSON {
# "$schema" = "https://opencode.ai/config.json";
# model = "ollama/${model}";
# theme = "matrix";
# provider = {
# ollama = {
# name = "Ollama (local)";
# npm = "@ai-sdk/openai-compatible";
# options = {
# baseURL = "http://localhost:11434/v1";
# };
# models = {
# "${model}" = {
# tools = true;
# };
# };
# };
# };
# };
};
programs.opencode = {
enable = true;
package = pkgs.opencode;
themes.theme = with rice.color; let
dl = color: { dark = color; light = color; };
in {
accent = dl accent.base;
background = dl background;
backgroundElement = dl subtle.dark;
backgroundPanel = dl subtle.darker;
border = dl subtle.base;
borderActive = dl border;
borderSubtle = dl subtle.dark;
diffAdded = dl positive.base;
diffAddedBg = dl positive.darker;
diffAddedLineNumberBg = dl positive.dark;
diffContext = dl foreground;
diffContextBg = dl subtle.dark;
diffHighlightAdded = dl positive.bright;
diffHighlightRemoved = dl negative.bright;
diffHunkHeader = dl foreground;
diffLineNumber = dl subtle.base;
diffRemoved = dl negative.base;
diffRemovedBg = dl negative.darker;
diffRemovedLineNumberBg = dl negative.dark;
error = dl negative.dark;
info = dl special.base;
markdownBlockQuote = dl accent.base;
markdownCode = dl secondary.base;
markdownCodeBlock = dl secondary.base;
markdownEmph = dl accent.base;
markdownHeading = dl accent.base;
markdownHorizontalRule = dl border;
markdownImage = dl accent.base;
markdownImageText = dl accent.bright;
markdownLink = dl accent.base;
markdownLinkText = dl accent.bright;
markdownListEnumeration = dl foreground;
markdownListItem = dl foreground;
markdownStrong = dl accent.base;
markdownText = dl foreground;
primary = dl accent.base;
secondary = dl secondary.base;
success = dl positive.base;
syntaxComment = dl subtle.base;
syntaxFunction = dl accent.base;
syntaxKeyword = dl special.base;
syntaxNumber = dl tertiary.base;
syntaxOperator = dl accent.base;
syntaxPunctuation = dl foreground;
syntaxString = dl accent.base;
syntaxType = dl tertiary.base;
syntaxVariable = dl accent.base;
text = dl foreground;
textMuted = dl subtle.bright;
warning = dl weird.base;
};
};
}