Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b36ae1ce83 | |||
| 7aae4b451a | |||
| ee8b2795f1 | |||
| 0c64eaef02 | |||
| 6a99cc0846 | |||
| dd111756cf | |||
| 18d9f5c98a |
@@ -7,6 +7,7 @@
|
|||||||
./modules/git.nix
|
./modules/git.nix
|
||||||
./modules/tmux.nix
|
./modules/tmux.nix
|
||||||
./modules/scripts.nix
|
./modules/scripts.nix
|
||||||
|
./modules/opencode.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# ============================================
|
# ============================================
|
||||||
@@ -32,6 +33,7 @@
|
|||||||
podman-compose
|
podman-compose
|
||||||
# AI
|
# AI
|
||||||
claude-code
|
claude-code
|
||||||
|
opencode
|
||||||
|
|
||||||
# Custom packages
|
# Custom packages
|
||||||
(pkgs.callPackage ../pkgs/ax {})
|
(pkgs.callPackage ../pkgs/ax {})
|
||||||
|
|||||||
@@ -0,0 +1,74 @@
|
|||||||
|
{ config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
xdg.configFile."opencode/opencode.json".text = builtins.toJSON {
|
||||||
|
"$schema" = "https://opencode.ai/config.json";
|
||||||
|
provider = {
|
||||||
|
openrouter = {
|
||||||
|
models = {
|
||||||
|
"openrouter/openai/gpt-oss-120b" = {
|
||||||
|
options = {
|
||||||
|
provider = {
|
||||||
|
order = [ "groq" "cerebras" ];
|
||||||
|
allow_fallbacks = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"openrouter/moonshotai/kimi-k2.5" = {
|
||||||
|
options = {
|
||||||
|
provider = {
|
||||||
|
order = [ "Nitro" ];
|
||||||
|
allow_fallbacks = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
agent = {
|
||||||
|
commit = {
|
||||||
|
description = "Creates a one-line git commit describing the changes";
|
||||||
|
mode = "primary";
|
||||||
|
model = "openrouter/openai/gpt-oss-120b";
|
||||||
|
prompt = ''
|
||||||
|
You are a git commit agent. When invoked:
|
||||||
|
1. Run `git status` and `git diff` to understand all changes
|
||||||
|
2. Stage appropriate files with `git add`
|
||||||
|
3. Create a single one-line commit message that clearly describes the changes
|
||||||
|
4. Never push to remote
|
||||||
|
5. Never use --no-verify or --force flags
|
||||||
|
'';
|
||||||
|
permission = {
|
||||||
|
bash = {
|
||||||
|
"git *" = "allow";
|
||||||
|
};
|
||||||
|
edit = "allow";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
compact = {
|
||||||
|
description = "Compacts and summarizes conversation context to reduce token usage";
|
||||||
|
mode = "primary";
|
||||||
|
model = "openrouter/openai/gpt-oss-120b";
|
||||||
|
prompt = ''
|
||||||
|
You are a context compaction specialist. Your job is to summarize and compress the conversation history while preserving:
|
||||||
|
1. Key decisions and their rationale
|
||||||
|
2. Important code changes and their purposes
|
||||||
|
3. Unresolved issues or TODOs
|
||||||
|
4. File paths and line references that are still relevant
|
||||||
|
|
||||||
|
Be extremely concise. Remove:
|
||||||
|
- Redundant explanations
|
||||||
|
- Already-applied code diffs
|
||||||
|
- Exploration steps that didn't lead anywhere
|
||||||
|
- Verbose tool outputs
|
||||||
|
|
||||||
|
Output a dense, information-rich summary that captures the essential state of the conversation.
|
||||||
|
'';
|
||||||
|
permission = {
|
||||||
|
edit = "deny";
|
||||||
|
bash = { "*" = "deny"; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -62,6 +62,7 @@
|
|||||||
bind -r l select-pane -R
|
bind -r l select-pane -R
|
||||||
bind -r r source-file ~/.config/tmux/tmux.conf \; display-message "tmux.conf reloaded"
|
bind -r r source-file ~/.config/tmux/tmux.conf \; display-message "tmux.conf reloaded"
|
||||||
bind q display-popup -E -w 60% -h 60% -d '#{session_path}' 'nvim quicknote.md'
|
bind q display-popup -E -w 60% -h 60% -d '#{session_path}' 'nvim quicknote.md'
|
||||||
|
bind t display-popup -E -w 60% -h 60% -d '#{pane_current_path}' '$SHELL'
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
languagePackages = {
|
languagePackages = {
|
||||||
rust = with pkgs; [ rustup cargo-deny cargo-edit ];
|
rust = with pkgs; [ rustup cargo-deny cargo-edit ];
|
||||||
python = with pkgs; [ python3 python3Packages.pip python3Packages.virtualenv uv ];
|
python = with pkgs; [ python3 python3Packages.pip python3Packages.virtualenv uv mypy ];
|
||||||
nodejs = with pkgs; [ nodejs pnpm ];
|
nodejs = with pkgs; [ nodejs pnpm ];
|
||||||
go = with pkgs; [ go golangci-lint ];
|
go = with pkgs; [ go golangci-lint ];
|
||||||
ruby = with pkgs; [ ruby bundler ];
|
ruby = with pkgs; [ ruby bundler ];
|
||||||
|
|||||||
Reference in New Issue
Block a user