diff --git a/home/base/tui/agents/README.md b/home/base/tui/agents/README.md index ccfa097f..4397409b 100644 --- a/home/base/tui/agents/README.md +++ b/home/base/tui/agents/README.md @@ -13,12 +13,12 @@ Markdown with no Nix dependency; this module only wires it into place. - `skills.nix`: links the global skills into `~/.agents/skills/`, from pinned flake inputs and from `agents/skills/`; the inventory is [agents/skills/README.md](../../../../agents/skills/README.md). -- `packages.nix`: agent CLIs (`codex`, `opencode2`, `pi`) from the `llm-agents` flake input, dsh - from `nur-ryan4yin`, `pkgs.ctx7` for the `find-docs` skill, and `pkgs.mcp-grafana` for the Grafana - MCP server. dsh's Nushell-only shell is selected when the package is built, via `dsh.withPlugins` - with the plugin from the `dsh-nu` flake input, so it is a derivation choice rather than runtime - state; profile patches live in `~/.dsh/profiles//cordis.patch.yml`. See [dsh.md](./dsh.md) - for the layer order and the settings that bite. +- `packages.nix`: agent CLIs (`codex`, `opencode`, `qwen-code`, `pi`) from the `llm-agents` flake + input, dsh from `nur-ryan4yin`, `pkgs.ctx7` for the `find-docs` skill, and `pkgs.mcp-grafana` for + the Grafana MCP server. dsh's Nushell-only shell is selected when the package is built, via + `dsh.withPlugins` with the plugin from the `dsh-nu` flake input, so it is a derivation choice + rather than runtime state; profile patches live in `~/.dsh/profiles//cordis.patch.yml`. See + [dsh.md](./dsh.md) for the layer order and the settings that bite. - `env.nix`: telemetry and auto-update opt-outs for the agents. ## Deployed rule targets diff --git a/home/base/tui/agents/packages.nix b/home/base/tui/agents/packages.nix index c22e8867..a63edfcd 100644 --- a/home/base/tui/agents/packages.nix +++ b/home/base/tui/agents/packages.nix @@ -12,12 +12,21 @@ let inherit pkgs; inherit (pkgs) dsh; }; + # llm-agents.nix still exposes OpenCode V2 as `opencode2` so it can coexist + # with the v1 package. Re-expose its binary under the normal command name. + opencode = pkgs.linkFarm "opencode" [ + { + name = "bin/opencode"; + path = "${agentPackages.opencode2}/bin/opencode2"; + } + ]; in { home.packages = [ # Agents agentPackages.codex - agentPackages.opencode2 + opencode + agentPackages.qwen-code agentPackages.pi # dsh from nur-packages: llm-agents.nix's dsh cannot boot on nixpkgs node # (node-addon-require-builtin probe), this one shims it. The Nushell-only diff --git a/hosts/idols-ai/preservation.nix b/hosts/idols-ai/preservation.nix index 46ae5bcd..045ad79b 100644 --- a/hosts/idols-ai/preservation.nix +++ b/hosts/idols-ai/preservation.nix @@ -178,6 +178,12 @@ in ".codex" ".dsh" # DeepSeek Harness ".pi" + # Qwen Code keeps settings, credentials, history, sessions, and logs + # under ~/.qwen; keep the whole directory private and persistent. + { + directory = ".qwen"; + mode = "0700"; + } ".config/opencode" ".local/share/opencode" ".local/state/opencode" diff --git a/hosts/idols-aquamarine/preservation.nix b/hosts/idols-aquamarine/preservation.nix index 7ccaff97..e16d7494 100644 --- a/hosts/idols-aquamarine/preservation.nix +++ b/hosts/idols-aquamarine/preservation.nix @@ -100,6 +100,12 @@ in ".codex" ".dsh" # DeepSeek Harness ".pi" + # Qwen Code keeps settings, credentials, history, sessions, and logs + # under ~/.qwen; keep the whole directory private and persistent. + { + directory = ".qwen"; + mode = "0700"; + } ".config/opencode" ".local/share/opencode" ".local/state/opencode" diff --git a/outputs/x86_64-linux/tests/agent-profile/expected.nix b/outputs/x86_64-linux/tests/agent-profile/expected.nix index c7365816..e74d4abf 100644 --- a/outputs/x86_64-linux/tests/agent-profile/expected.nix +++ b/outputs/x86_64-linux/tests/agent-profile/expected.nix @@ -2,6 +2,7 @@ let common = { agentsFromHome = true; + qwenInstalled = true; devToolsFromHome = true; nushellSecrets = false; nixLd = true; diff --git a/outputs/x86_64-linux/tests/agent-profile/expr.nix b/outputs/x86_64-linux/tests/agent-profile/expr.nix index 40547965..e671fb26 100644 --- a/outputs/x86_64-linux/tests/agent-profile/expr.nix +++ b/outputs/x86_64-linux/tests/agent-profile/expr.nix @@ -23,6 +23,7 @@ lib.genAttrs hosts ( { # home role: home/linux/tui.nix agentsFromHome = hasPackage "codex" home.home.packages; + qwenInstalled = hasPackage "qwen-code" home.home.packages; devToolsFromHome = hasPackage "kubectl" home.home.packages; # ~/.secrets is synced to the desktops only; sourcing it would break nushell. nushellSecrets = home.modules.shell.secrets.enable; diff --git a/outputs/x86_64-linux/tests/idols-ai-gpu/expected.nix b/outputs/x86_64-linux/tests/idols-ai-gpu/expected.nix index bbfdccae..633d2ae0 100644 --- a/outputs/x86_64-linux/tests/idols-ai-gpu/expected.nix +++ b/outputs/x86_64-linux/tests/idols-ai-gpu/expected.nix @@ -19,4 +19,5 @@ wivrnImportsOpenXRToSteam = true; wivrnStatePreserved = true; adbStatePreserved = true; + qwenStatePreserved = true; } diff --git a/outputs/x86_64-linux/tests/idols-ai-gpu/expr.nix b/outputs/x86_64-linux/tests/idols-ai-gpu/expr.nix index 7f7395a1..5ceaa22f 100644 --- a/outputs/x86_64-linux/tests/idols-ai-gpu/expr.nix +++ b/outputs/x86_64-linux/tests/idols-ai-gpu/expr.nix @@ -54,4 +54,5 @@ in cfg.environment.sessionVariables.PRESSURE_VESSEL_IMPORT_OPENXR_1_RUNTIMES == "1"; wivrnStatePreserved = privatelyPreserved ".config/wivrn"; adbStatePreserved = privatelyPreserved ".android"; + qwenStatePreserved = privatelyPreserved ".qwen"; } diff --git a/outputs/x86_64-linux/tests/idols-aquamarine/expr.nix b/outputs/x86_64-linux/tests/idols-aquamarine/expr.nix index 34e5ef34..97b46bc4 100644 --- a/outputs/x86_64-linux/tests/idols-aquamarine/expr.nix +++ b/outputs/x86_64-linux/tests/idols-aquamarine/expr.nix @@ -102,6 +102,7 @@ in ".local/state/home-manager" ".local/state/nix/profiles" ".codex" + ".qwen" ".config/opencode" ]; pythonInstalled = builtins.any (