Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions config/aichat/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
_:
{
_: {
home.file.".config/aichat/config.yaml" = {
source = ./config.yaml;
force = true;
Expand Down
3 changes: 1 addition & 2 deletions config/amp/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
_:
{
_: {
xdg.configFile."amp/settings.json" = {
source = ./settings.json;
};
Expand Down
3 changes: 1 addition & 2 deletions config/cliproxyapi/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
_:
{
_: {
# Template config - the service wrapper injects secrets and writes to config.yaml
home.file.".cli-proxy-api/config.template.yaml" = {
source = ./config.template.yaml;
Expand Down
3 changes: 1 addition & 2 deletions config/crush/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
_:
{
_: {
home.file.".config/crush/crush.json" = {
source = ./crush.json;
force = true;
Expand Down
3 changes: 1 addition & 2 deletions config/direnv/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
_:
{
_: {
home.file.".config/direnv/direnvrc" = {
source = ./direnvrc;
force = true;
Expand Down
3 changes: 1 addition & 2 deletions config/eww/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
_:
{
_: {
xdg.configFile."eww/eww.yuck" = {
source = ./eww.yuck;
force = true;
Expand Down
3 changes: 1 addition & 2 deletions config/factory/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
_:
{
_: {
home.file.".factory/config.json" = {
source = ./config.json;
force = true;
Expand Down
3 changes: 1 addition & 2 deletions config/gomi/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
_:
{
_: {
xdg.configFile."gomi/config.yaml" = {
source = ./config.yaml;
};
Expand Down
3 changes: 1 addition & 2 deletions config/hammerspoon/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
_:
{
_: {
home.file.".hammerspoon/init.lua" = {
source = ./init.lua;
force = true;
Expand Down
3 changes: 1 addition & 2 deletions config/hyprpanel/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
_:
{
_: {
programs.hyprpanel = {
enable = true;
systemd.enable = false;
Expand Down
3 changes: 1 addition & 2 deletions config/hyprshell/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
_:
{
_: {
xdg.configFile."hyprshell/config.toml" = {
source = ./config.toml;
force = true;
Expand Down
3 changes: 1 addition & 2 deletions config/jj/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
_:
{
_: {
xdg.configFile."jj/config.toml" = {
source = ./config.toml;
};
Expand Down
3 changes: 1 addition & 2 deletions config/karabiner/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
_:
{
_: {
home.file.".config/karabiner/karabiner.json" = {
source = ./karabiner.json;
force = true;
Expand Down
3 changes: 1 addition & 2 deletions config/nwg-dock-hyprland/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
_:
{
_: {
xdg.configFile."nwg-dock-hyprland/style.css" = {
source = ./style.css;
force = true;
Expand Down
3 changes: 1 addition & 2 deletions config/nwg-drawer/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
_:
{
_: {
xdg.configFile."nwg-drawer/drawer.css" = {
source = ./drawer.css;
force = true;
Expand Down
3 changes: 1 addition & 2 deletions config/opencode/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
_:
{
_: {
home.file.".config/opencode/opencode.jsonc" = {
source = ./opencode.jsonc;
force = true;
Expand Down
3 changes: 1 addition & 2 deletions config/pi/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
_:
{
_: {
home.file.".pi/agent/models.json" = {
source = ./models.json;
force = true;
Expand Down
3 changes: 1 addition & 2 deletions config/starship/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
_:
{
_: {
home.file.".config/starship.toml" = {
source = ./starship.toml;
force = true;
Expand Down
3 changes: 1 addition & 2 deletions config/walker/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
_:
{
_: {
xdg.configFile."walker/config.toml" = {
source = ./config.toml;
force = true;
Expand Down
3 changes: 1 addition & 2 deletions config/worktrunk/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
_:
{
_: {
xdg.configFile."worktrunk/config.toml" = {
source = ./config.toml;
force = true;
Expand Down
3 changes: 1 addition & 2 deletions config/zellij/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
_:
{
_: {
xdg.configFile."zellij/config.kdl" = {
source = ./config.kdl;
};
Expand Down
11 changes: 8 additions & 3 deletions home-manager/modules/obsidian/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ let
# so they get pulled into the closure automatically without needing to
# appear directly on PATH. Only this shim is exposed as `obsidian`,
# which is exactly what memory-wiki probes for.
obsidianHeadless = pkgs.writeShellScriptBin "obsidian" ''
exec ${pkgs.xvfb-run}/bin/xvfb-run -a ${pkgs.obsidian}/bin/obsidian "$@"
'';
obsidianHeadless = pkgs.writeShellScriptBin "obsidian" (
builtins.readFile (
pkgs.replaceVars ./obsidian-headless.sh {
xvfbRun = pkgs.xvfb-run;
obsidian = pkgs.obsidian;
}
)
);
in
# Only enable on kyber (gateway host) — desktops already get pkgs.obsidian
# directly via home-manager/packages/default.nix.
Expand Down
2 changes: 2 additions & 0 deletions home-manager/modules/obsidian/obsidian-headless.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
exec @xvfbRun@/bin/xvfb-run -a @obsidian@/bin/obsidian "$@"
8 changes: 4 additions & 4 deletions home-manager/programs/fish/functions/_coxel_function.fish
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
function _coxel_function --description "Run Codex with a free-form prompt using the local Gemma model"
# Run Codex with a free-form prompt (spaces allowed) using the local Gemma model
function _coxel_function --description "Run Codex with a free-form prompt using the local Qwen model"
# Run Codex with a free-form prompt (spaces allowed) using the local Qwen model
# Usage: cxel [<prompt words...>]

if test (count $argv) -gt 0; and contains -- "$argv[1]" --resume -r --continue -c
codex resume $argv[2]
else if test (count $argv) -eq 0
codex --oss --local-provider lmstudio --model 'lmstudio-community/gemma-4-e4b-it' --full-auto -c model_reasoning_effort=minimal
codex --oss --local-provider lmstudio --model 'qwen/qwen3.5-9b' --full-auto -c model_reasoning_effort=minimal
else
set -l prompt (string join " " -- $argv)
codex exec --oss --local-provider lmstudio --model 'lmstudio-community/gemma-4-e4b-it' --full-auto -c model_reasoning_effort=minimal -- "$prompt"
codex exec --oss --local-provider lmstudio --model 'qwen/qwen3.5-9b' --full-auto -c model_reasoning_effort=minimal -- "$prompt"
end
end
8 changes: 4 additions & 4 deletions home-manager/programs/fish/functions/_coxel_function.tpl.fish
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
function _coxel_function --description "Run Codex with a free-form prompt using the local Gemma model"
# Run Codex with a free-form prompt (spaces allowed) using the local Gemma model
function _coxel_function --description "Run Codex with a free-form prompt using the local Qwen model"
# Run Codex with a free-form prompt (spaces allowed) using the local Qwen model
# Usage: cxel [<prompt words...>]

if test (count $argv) -gt 0; and contains -- "$argv[1]" --resume -r --continue -c
codex resume $argv[2]
else if test (count $argv) -eq 0
codex --oss --local-provider lmstudio --model '__GEMMA__' --full-auto -c model_reasoning_effort=minimal
codex --oss --local-provider lmstudio --model '__QWEN_LOCAL__' --full-auto -c model_reasoning_effort=minimal

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The template now uses the __QWEN_LOCAL__ placeholder, which likely maps to the qwen-local key in models.json. However, the current models.json (visible in the repository context) still defines qwen-local as qwen3.5-0.8b-optiq.

To ensure that generated functions correctly use the new model and match the hardcoded .fish files updated in this PR, models.json should be updated to point to qwen/qwen3.5-9b.

@cubic-dev-ai cubic-dev-ai Bot Apr 10, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The __QWEN_LOCAL__ placeholder will resolve to whatever value models.json maps for qwen-local. If that file still points to the old model (qwen3.5-0.8b-optiq), the template-generated functions will use a different model than the hardcoded .fish files (qwen/qwen3.5-9b). Ensure models.json is updated in this PR to keep both in sync.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At home-manager/programs/fish/functions/_coxel_function.tpl.fish, line 8:

<comment>The `__QWEN_LOCAL__` placeholder will resolve to whatever value `models.json` maps for `qwen-local`. If that file still points to the old model (`qwen3.5-0.8b-optiq`), the template-generated functions will use a different model than the hardcoded `.fish` files (`qwen/qwen3.5-9b`). Ensure `models.json` is updated in this PR to keep both in sync.</comment>

<file context>
@@ -1,13 +1,13 @@
     codex resume $argv[2]
   else if test (count $argv) -eq 0
-    codex --oss --local-provider lmstudio --model '__GEMMA__' --full-auto -c model_reasoning_effort=minimal
+    codex --oss --local-provider lmstudio --model '__QWEN_LOCAL__' --full-auto -c model_reasoning_effort=minimal
   else
     set -l prompt (string join " " -- $argv)
</file context>
Fix with Cubic

else
set -l prompt (string join " " -- $argv)
codex exec --oss --local-provider lmstudio --model '__GEMMA__' --full-auto -c model_reasoning_effort=minimal -- "$prompt"
codex exec --oss --local-provider lmstudio --model '__QWEN_LOCAL__' --full-auto -c model_reasoning_effort=minimal -- "$prompt"
end
Comment on lines 7 to 12

Copilot AI Apr 10, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These templates now use the __QWEN_LOCAL__ placeholder, but scripts/llm-update.sh sources placeholder values from the repo-level models.json key qwen-local, which currently maps to qwen3.5-0.8b-optiq. As-is, rerunning scripts/llm-update.sh will regenerate the concrete .fish wrappers back to the old model. Update models.json (qwen-local) to qwen/qwen3.5-9b (and re-run llm-update) so the placeholder-driven generation stays consistent with the committed .fish files.

Copilot uses AI. Check for mistakes.
end
6 changes: 3 additions & 3 deletions home-manager/programs/fish/functions/_coxelh_function.fish
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function _coxelh_function --description "Run Codex headlessly with the local Gemma model"
# Prompt for input and run Codex with the local Gemma model
function _coxelh_function --description "Run Codex headlessly with the local Qwen model"
# Prompt for input and run Codex with the local Qwen model
# Usage: coxelh

set -l prompt
Expand All @@ -14,5 +14,5 @@ function _coxelh_function --description "Run Codex headlessly with the local Gem
return 1
end

codex exec --oss --local-provider lmstudio --model 'lmstudio-community/gemma-4-e4b-it' --full-auto -c model_reasoning_effort=minimal -- "$prompt"
codex exec --oss --local-provider lmstudio --model 'qwen/qwen3.5-9b' --full-auto -c model_reasoning_effort=minimal -- "$prompt"
end
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function _coxelh_function --description "Run Codex headlessly with the local Gemma model"
# Prompt for input and run Codex with the local Gemma model
function _coxelh_function --description "Run Codex headlessly with the local Qwen model"
# Prompt for input and run Codex with the local Qwen model
# Usage: coxelh

set -l prompt
Expand All @@ -14,5 +14,5 @@ function _coxelh_function --description "Run Codex headlessly with the local Gem
return 1
end

codex exec --oss --local-provider lmstudio --model '__GEMMA__' --full-auto -c model_reasoning_effort=minimal -- "$prompt"
codex exec --oss --local-provider lmstudio --model '__QWEN_LOCAL__' --full-auto -c model_reasoning_effort=minimal -- "$prompt"
end
12 changes: 6 additions & 6 deletions home-manager/programs/fish/functions/_ocxel_function.fish
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
function _ocxel_function --description "Run OpenCode with a free-form prompt using the local Gemma model"
# Run OpenCode with a free-form prompt (spaces allowed) using the local Gemma model
function _ocxel_function --description "Run OpenCode with a free-form prompt using the local Qwen model"
# Run OpenCode with a free-form prompt (spaces allowed) using the local Qwen model
# Usage: ocxel [<prompt words...>]

if test (count $argv) -gt 0; and contains -- "$argv[1]" --resume -r --continue -c
if test (count $argv) -gt 1
opencode -m 'lmstudio/lmstudio-community/gemma-4-e4b-it' --session "$argv[2]"
opencode -m 'lmstudio/qwen/qwen3.5-9b' --session "$argv[2]"
else
opencode -m 'lmstudio/lmstudio-community/gemma-4-e4b-it' --continue
opencode -m 'lmstudio/qwen/qwen3.5-9b' --continue
end
else if test (count $argv) -eq 0
opencode -m 'lmstudio/lmstudio-community/gemma-4-e4b-it'
opencode -m 'lmstudio/qwen/qwen3.5-9b'
else
set -l prompt (string join " " -- $argv)
opencode run "$prompt" -m 'lmstudio/lmstudio-community/gemma-4-e4b-it'
opencode run "$prompt" -m 'lmstudio/qwen/qwen3.5-9b'
end
end
12 changes: 6 additions & 6 deletions home-manager/programs/fish/functions/_ocxel_function.tpl.fish
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
function _ocxel_function --description "Run OpenCode with a free-form prompt using the local Gemma model"
# Run OpenCode with a free-form prompt (spaces allowed) using the local Gemma model
function _ocxel_function --description "Run OpenCode with a free-form prompt using the local Qwen model"
# Run OpenCode with a free-form prompt (spaces allowed) using the local Qwen model
# Usage: ocxel [<prompt words...>]

if test (count $argv) -gt 0; and contains -- "$argv[1]" --resume -r --continue -c
if test (count $argv) -gt 1
opencode -m 'lmstudio/__GEMMA__' --session "$argv[2]"
opencode -m 'lmstudio/__QWEN_LOCAL__' --session "$argv[2]"
else
opencode -m 'lmstudio/__GEMMA__' --continue
opencode -m 'lmstudio/__QWEN_LOCAL__' --continue
end
else if test (count $argv) -eq 0
opencode -m 'lmstudio/__GEMMA__'
opencode -m 'lmstudio/__QWEN_LOCAL__'
else
set -l prompt (string join " " -- $argv)
opencode run "$prompt" -m 'lmstudio/__GEMMA__'
opencode run "$prompt" -m 'lmstudio/__QWEN_LOCAL__'
end
end
6 changes: 3 additions & 3 deletions home-manager/programs/fish/functions/_ocxelh_function.fish
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function _ocxelh_function --description "Run OpenCode headlessly with the local Gemma model"
# Prompt for input and run OpenCode with the local Gemma model
function _ocxelh_function --description "Run OpenCode headlessly with the local Qwen model"
# Prompt for input and run OpenCode with the local Qwen model
# Usage: ocxelh

set -l prompt
Expand All @@ -14,5 +14,5 @@ function _ocxelh_function --description "Run OpenCode headlessly with the local
return 1
end

opencode run "$prompt" -m 'lmstudio/lmstudio-community/gemma-4-e4b-it'
opencode run "$prompt" -m 'lmstudio/qwen/qwen3.5-9b'
end
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function _ocxelh_function --description "Run OpenCode headlessly with the local Gemma model"
# Prompt for input and run OpenCode with the local Gemma model
function _ocxelh_function --description "Run OpenCode headlessly with the local Qwen model"
# Prompt for input and run OpenCode with the local Qwen model
# Usage: ocxelh

set -l prompt
Expand All @@ -14,5 +14,5 @@ function _ocxelh_function --description "Run OpenCode headlessly with the local
return 1
end

opencode run "$prompt" -m 'lmstudio/__GEMMA__'
opencode run "$prompt" -m 'lmstudio/__QWEN_LOCAL__'
end
6 changes: 3 additions & 3 deletions home-manager/programs/fish/functions/_pixel_function.fish
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ function _pixel_function --description "Run Pi with a free-form prompt using the
# Usage: pixel [<prompt words...>]

if test (count $argv) -gt 0; and contains -- "$argv[1]" --resume -r --continue -c
pi --model 'lmstudio/qwen3.5-0.8b-optiq' --resume $argv[2]
pi --model 'lmstudio/qwen/qwen3.5-9b' --resume $argv[2]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The pull request description states that Gemma model references are being replaced in all codex, opencode, and pi fish functions, including both .fish and .tpl.fish versions. While the .fish files for pixel and pixelh are updated here, their corresponding template files (_pixel_function.tpl.fish and _pixelh_function.tpl.fish) are missing from the changes. If these templates exist in the repository, they should be updated to maintain consistency with the other functions.

else if test (count $argv) -eq 0
pi --model 'lmstudio/qwen3.5-0.8b-optiq'
pi --model 'lmstudio/qwen/qwen3.5-9b'
else
set -l prompt (string join " " -- $argv)
pi --model 'lmstudio/qwen3.5-0.8b-optiq' "$prompt"
pi --model 'lmstudio/qwen/qwen3.5-9b' "$prompt"
end
end
2 changes: 1 addition & 1 deletion home-manager/programs/fish/functions/_pixelh_function.fish
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ function _pixelh_function --description "Run Pi headlessly with the local Qwen m
return 1
end

pi --model 'lmstudio/qwen3.5-0.8b-optiq' -p "$prompt"
pi --model 'lmstudio/qwen/qwen3.5-9b' -p "$prompt"
end
3 changes: 1 addition & 2 deletions home-manager/programs/ssh/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
_:
{
_: {
home.file.".ssh/rc" = {
source = ./rc;
force = true;
Expand Down
1 change: 1 addition & 0 deletions spec/coverage_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ home-manager/modules/local-scripts/clipboard-paste.sh
home-manager/modules/local-scripts/notify-local.sh
home-manager/modules/local-scripts/tmux-bridge.sh
home-manager/modules/npm-globals/install-npm-globals.sh
home-manager/modules/obsidian/obsidian-headless.sh
home-manager/modules/uv-globals/install-uv-globals.sh
home-manager/programs/neovim/run_tests.sh
home-manager/programs/tmux/session-logger.sh
Expand Down
46 changes: 46 additions & 0 deletions spec/obsidian_headless_spec.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env bash
# shellcheck disable=SC2329

Describe 'home-manager/modules/obsidian/obsidian-headless.sh'
SCRIPT="$PWD/home-manager/modules/obsidian/obsidian-headless.sh"

Describe 'script properties'
It 'uses bash shebang'
When run bash -c "head -1 '$SCRIPT'"
The output should include '#!/usr/bin/env bash'
End

It 'passes bash syntax check after replacing placeholders'
When run bash -c "sed -e 's|@xvfbRun@|/usr|g' -e 's|@obsidian@|/usr|g' '$SCRIPT' | bash -n"
The status should be success
End
End

Describe 'placeholder references'
It 'references xvfb-run via placeholder'
When run bash -c "grep '@xvfbRun@' '$SCRIPT'"
The output should include '@xvfbRun@'
End

It 'references obsidian via placeholder'
When run bash -c "grep '@obsidian@' '$SCRIPT'"
The output should include '@obsidian@'
End

It 'uses exec to replace the process'
When run bash -c "grep '^exec ' '$SCRIPT'"
The output should include 'exec'
End

It 'passes all arguments through'
When run bash -c "grep '[\$]@' '$SCRIPT'"
The output should include '$@'
End

It 'uses xvfb-run with auto-servernum flag'
When run bash -c "grep '\\-a' '$SCRIPT'"
The output should include '-a'
End
End

End
Loading