mirror of
https://codeberg.org/muon/home.git
synced 2026-07-03 23:49:35 +00:00
72 lines
1.8 KiB
Nix
72 lines
1.8 KiB
Nix
{
|
|
lib,
|
|
config,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
options.mods.opencode.enable = lib.mkEnableOption "enables opencode";
|
|
|
|
# imports = [
|
|
# ./package.nix
|
|
# ./dcg.nix
|
|
# ];
|
|
|
|
config = lib.mkIf config.mods.opencode.enable {
|
|
home.packages = with pkgs; [
|
|
(callPackage ./dcg.nix {})
|
|
];
|
|
|
|
programs.opencode = {
|
|
enable = true;
|
|
settings = {
|
|
"plugin" = ["opencode-gemini-auth" "opencode-anthropic-oauth"];
|
|
|
|
"mode" = {
|
|
"build" = {
|
|
"prompt" = "You are Claude Code, Anthropic's official CLI for Claude.";
|
|
};
|
|
"plan" = {
|
|
"prompt" = "You are Claude Code, Anthropic's official CLI for Claude.";
|
|
};
|
|
};
|
|
|
|
"permission" = {
|
|
"bash" = {
|
|
"*" = "ask";
|
|
"*>*" = "ask";
|
|
"rm *" = "deny";
|
|
"rmdir *" = "deny";
|
|
"unlink *" = "deny";
|
|
"*rm *" = "ask";
|
|
"*rmdir *" = "ask";
|
|
"*unlink *" = "ask";
|
|
"awk *>*" = "ask";
|
|
"*-exec*" = "ask";
|
|
"git status" = "allow";
|
|
"git log" = "allow";
|
|
"git diff" = "allow";
|
|
"git show" = "allow";
|
|
"ls *" = "allow";
|
|
"head *" = "allow";
|
|
"tail *" = "allow";
|
|
"sort *" = "allow";
|
|
"uniq *" = "allow";
|
|
"grep *" = "allow";
|
|
"find *" = "allow";
|
|
"rg *" = "allow";
|
|
"fd *" = "allow";
|
|
"cat *" = "allow";
|
|
"wc *" = "allow";
|
|
"jq *" = "allow";
|
|
"file *" = "allow";
|
|
"diff *" = "allow";
|
|
"awk *" = "allow";
|
|
"pwd *" = "allow";
|
|
"cut *" = "allow";
|
|
"tr *" = "allow";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|