Skip to content

Commit afe425e

Browse files
committed
added readme file, LLM modified opencode and kde config
1 parent 9e7f77c commit afe425e

File tree

6 files changed

+292
-174
lines changed

6 files changed

+292
-174
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# NixOS Configuration Context
2+
3+
## Architecture
4+
5+
- Using flakes.
6+
- System-level configuration and user-level configuration (Home Manager) are mixed up in the same files.
7+
- 'hosts/' - Main configuration and hardware configuration for each of the hosts.
8+
- 'libs/' - Declarations and reusable content.
9+
- 'modules/apps/' - Application-specific configuration.
10+
- 'modules/harwdare/' - Hardware-specific configuration.
11+
- 'modules/services/' - Configuration for services running on the hosts.
12+
- 'modules/system/' - Configuration for large subsystems (for example graphical subsystem) involving multiple apps and/or system configuration.
13+
- 'secrets/' - encoded secrets (using ragenix).
14+
15+
## Hosts Inventory
16+
17+
1. Host: 'dinth-nixos-desktop'
18+
- Hardware: desktop computer
19+
- Usecase: primary workstation
20+
2. Host: 'michal-surface-go'
21+
- Hardware: Microsoft Surface Go 3
22+
- Usecase: highly mobile workstation
23+
3. Host: 'r230-nixos'
24+
- Hardware: Dell PowerEdge R230
25+
- Usecase: docker server

flake.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/apps/google-chrome/default.nix

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
{ config, lib, pkgs, machineType ? "", ... }:
1+
{
2+
config,
3+
lib,
4+
pkgs,
5+
machineType ? "",
6+
...
7+
}:
28
let
39
inherit (lib) mkIf;
410
cfg = config.graphical;
@@ -20,28 +26,34 @@ let
2026
"--force-color-profile=srgb"
2127
];
2228
chromeFlags =
23-
if machineType == "tablet" then builtins.concatStringsSep " " tabletFlags
24-
else if machineType == "desktop" then builtins.concatStringsSep " " desktopFlags
25-
else "";
29+
if machineType == "tablet" then
30+
builtins.concatStringsSep " " tabletFlags
31+
else if machineType == "desktop" then
32+
builtins.concatStringsSep " " desktopFlags
33+
else
34+
"";
2635
extensionsPolicy = builtins.toJSON {
2736
PolicyListMultipleSourceMergeList = [ "ExtensionInstallForcelist" ];
2837
ExtensionInstallForcelist = [
2938
"lkbebcjgcmobigpeffafkodonchffocl;https://gitlab.com/magnolia1234/bypass-paywalls-chrome-clean/-/raw/master/updates.xml"
30-
] ++ lib.optionals (config.kde.enable or false) [
39+
]
40+
++ lib.optionals (config.kde.enable or false) [
3141
"cimiefiiaegbelhefglklhhakcgmhkai;https://clients2.google.com/service/update2/crx"
3242
];
3343
};
3444

35-
chromePackage = (pkgs.google-chrome.override {
45+
chromePackage =
46+
(pkgs.google-chrome.override {
3647
commandLineArgs = chromeFlags;
37-
}).overrideAttrs (old: {
38-
# Run this after the standard install to fix the desktop file
39-
postInstall = (old.postInstall or "") + ''
40-
if ! grep -q "StartupWMClass=" $out/share/applications/google-chrome.desktop; then
41-
echo "StartupWMClass=google-chrome" >> $out/share/applications/google-chrome.desktop
42-
fi
43-
'';
44-
});
48+
}).overrideAttrs
49+
(old: {
50+
# Run this after the standard install to fix the desktop file
51+
# postInstall = (old.postInstall or "") + ''
52+
# if ! grep -q "StartupWMClass=" $out/share/applications/google-chrome.desktop; then
53+
# echo "StartupWMClass=google-chrome" >> $out/share/applications/google-chrome.desktop
54+
# fi
55+
# '';
56+
});
4557
in
4658
{
4759
config = mkIf cfg.enable {
@@ -53,10 +65,12 @@ in
5365
environment.etc = {
5466
"opt/chrome/native-messaging-hosts/net.downloadhelper.coapp.json".source =
5567
"${pkgs.vdhcoapp}/lib/mozilla/native-messaging-hosts/net.downloadhelper.coapp.json";
56-
"/opt/chrome/policies/enrollment/CloudManagementEnrollmentToken".source = config.age.secrets.chrome-enrolment.path;
57-
"/opt/chrome/policies/enrollment/CloudManagementEnrollmentOptions".text = "Mandatory";
58-
"opt/chrome/policies/managed/extensions.json".text = extensionsPolicy;
59-
} // lib.optionalAttrs (config.kde.enable or false) {
68+
"/opt/chrome/policies/enrollment/CloudManagementEnrollmentToken".source =
69+
config.age.secrets.chrome-enrolment.path;
70+
"/opt/chrome/policies/enrollment/CloudManagementEnrollmentOptions".text = "Mandatory";
71+
"opt/chrome/policies/managed/extensions.json".text = extensionsPolicy;
72+
}
73+
// lib.optionalAttrs (config.kde.enable or false) {
6074
"opt/chrome/native-messaging-hosts/org.kde.plasma.browser_integration.json".source =
6175
"${pkgs.kdePackages.plasma-browser-integration}/etc/chromium/native-messaging-hosts/org.kde.plasma.browser_integration.json";
6276
};

modules/apps/opencode/default.nix

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ in
5757
theme = "catppuccin";
5858
provider = {
5959
opencode = {
60-
# timeout = 120000; # 2 minutes - handles long context processing
60+
# timeout = 120000;
6161
# retryAttempts = 3;
6262
# retryDelay = 1000;
6363
# retryExponentialBase = 2.0;
@@ -115,7 +115,8 @@ in
115115
agent = {
116116
manager = {
117117
mode = "primary";
118-
model = "opencode/claude-sonnet-4-5";
118+
model = "google/gemini-2.5-pro";
119+
# model = "opencode/claude-sonnet-4-5";
119120
prompt = ''
120121
You are the Technical Project Manager. Analyze user intent and delegate to specialists. For complex web research, use @procurement. For NixOS configuration, use @nixos-engineer.
121122
'';
@@ -183,7 +184,8 @@ in
183184
};
184185
web-extractor = {
185186
mode = "subagent";
186-
model = "opencode/gemini-3-flash";
187+
model = "google/gemini-2.5-flash";
188+
# model = "opencode/gemini-3-flash";
187189
prompt = "You are a Parsing Specialist. Convert raw HTML into clean JSON/Markdown. Discover API endpoints by inspecting source code.";
188190
# tools = ["firecrawl" "agentql"];
189191
temperature = 0.1;
@@ -208,7 +210,8 @@ in
208210
};
209211
triage-specialist = {
210212
mode = "subagent";
211-
model = "opencode/gemini-3-pro";
213+
model = "google/gemini-2.5-pro";
214+
# model = "opencode/gemini-3-pro";
212215
prompt = ''
213216
You are the Triage Lead. Your job is to find the "Why".
214217
1. When a failure is reported, query Grafana/Loki for error logs.
@@ -271,7 +274,8 @@ in
271274
};
272275
nixos-engineer = {
273276
mode = "subagent";
274-
model = "opencode/claude-sonnet-4-5";
277+
model = "google/gemini-2.5-pro";
278+
# model = "opencode/claude-sonnet-4-5";
275279
prompt = ''
276280
You are a NixOS Specialist.
277281
- Your goal is to maintain the system closure in /etc/nixos.
@@ -315,7 +319,8 @@ in
315319
};
316320
home-assistant-agent = {
317321
mode = "subagent";
318-
model = "opencode/claude-sonnet-4-5";
322+
model = "google/gemini-2.5-pro";
323+
# model = "opencode/claude-sonnet-4-5";
319324
prompt = ''
320325
You are an IoT Specialist.
321326
- You write Home Assistant YAML and ESPHome configs.
@@ -348,7 +353,8 @@ in
348353
};
349354
infra-manager = {
350355
mode = "subagent";
351-
model = "opencode/gemini-3-pro";
356+
model = "google/gemini-2.5-pro";
357+
# model = "opencode/gemini-3-pro";
352358
prompt = ''
353359
You are the Network Custodian.
354360
- READ first: Always consult `{file:~/.config/opencode/knowledge/infrastructure.md}` to locate devices.
@@ -380,7 +386,8 @@ in
380386
};
381387
polyglot-coder = {
382388
mode = "subagent";
383-
model = "opencode/gpt-5.2-codex";
389+
model = "google/gemini-2.5-pro";
390+
# model = "opencode/gpt-5.2-codex";
384391
prompt = ''
385392
You are an Expert Software Engineer specializing in Bash, Python 3 and PHP 8.3+.
386393
- BASH: Use 'set -euo pipefail', local variables, and prioritize readability. Always assume `shellcheck` will be run.
@@ -416,7 +423,8 @@ in
416423
};
417424
secops = {
418425
mode = "subagent";
419-
model = "opencode/claude-opus-4-5";
426+
model = "google/gemini-2.5-pro";
427+
# model = "opencode/claude-opus-4-5";
420428
prompt = "Ethical Hacker. Perform pentesting (ZAP/Nmap), risk modelling, and gather threat intelligence. Map findings to CVEs.";
421429
temperature = 0.4;
422430
topP = 0.9;
@@ -446,7 +454,6 @@ in
446454
"@mohak34/opencode-notifier@latest"
447455
];
448456
permission = {
449-
edit = "ask";
450457
bash = {
451458
# Allow non-destructive git commands with wildcards
452459
"git status*" = "allow";
@@ -555,7 +562,9 @@ in
555562
"docker network ls*" = "allow";
556563
"docker volume ls*" = "allow";
557564
};
565+
edit = "ask";
558566
read = "allow";
567+
context_info = "allow";
559568
list = "allow";
560569
glob = "allow";
561570
grep = "allow";

0 commit comments

Comments
 (0)