mirror of
https://codeberg.org/muon/home.git
synced 2026-07-04 07:59:33 +00:00
47 lines
1,008 B
Nix
47 lines
1,008 B
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";
|
|
"rm *" = "deny";
|
|
"rmdir *" = "deny";
|
|
"unlink *" = "deny";
|
|
"*rm *" = "ask";
|
|
"*rmdir *" = "ask";
|
|
"*unlink *" = "ask";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|