From a95d2aaba40bab135761a5bebcc8d9004fb5304a Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Sun, 18 Jan 2026 16:54:16 +0100 Subject: [PATCH] feat: update opencode settings to use model version with bigger context. --- modules/linux/home-manager/shell-additions.nix | 12 +++++++++--- modules/servers/general/fail2ban.nix | 16 ++++++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 modules/servers/general/fail2ban.nix diff --git a/modules/linux/home-manager/shell-additions.nix b/modules/linux/home-manager/shell-additions.nix index c494ac0..e8c852a 100644 --- a/modules/linux/home-manager/shell-additions.nix +++ b/modules/linux/home-manager/shell-additions.nix @@ -28,7 +28,7 @@ programs.opencode = { enable = true; settings = { - model = "ollama/gpt-oss:20b"; + model = "ollama/gpt-oss-20b-high-32k"; provider = { ollama = { npm = "@ai-sdk/openai-compatible"; @@ -37,10 +37,16 @@ baseURL = "http://127.0.0.1:11434/v1"; }; models = { - "gpt-oss:20b" = { - name = "gpt-oss:20b"; + "gpt-oss-20b-high-32k" = { + name = "gpt oss"; + id = "gpt-oss-20b-32k"; reasoning = true; tools = true; + options = { + extraBody = { + think = "high"; + }; + }; }; }; }; diff --git a/modules/servers/general/fail2ban.nix b/modules/servers/general/fail2ban.nix new file mode 100644 index 0000000..97dc9a5 --- /dev/null +++ b/modules/servers/general/fail2ban.nix @@ -0,0 +1,16 @@ +{...}: { + services.fail2ban = { + enable = true; + maxretry = 5; + ignoreIP = [ + "65.21.241.194" + ]; + bantime = "24h"; # Ban IPs for one day on the first ban + bantime-increment = { + enable = true; # Enable increment of bantime after each violation + multipliers = "1 2 4 8 16 32 64"; + maxtime = "168h"; # Do not ban for more than 1 week + overalljails = true; # Calculate the bantime based on all the violations + }; + }; +}