Skip to content

Commit d64798a

Browse files
committed
tabby works
1 parent 1b7f825 commit d64798a

File tree

6 files changed

+59
-16
lines changed

6 files changed

+59
-16
lines changed

cfg/coc-settings.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,6 @@
1212
"hie.yaml"
1313
],
1414
"filetypes": ["haskell", "lhaskell"]
15-
},
16-
"gleam": {
17-
"command": "gleam",
18-
"args": ["lsp"],
19-
"filetypes": ["gleam"]
20-
},
21-
"elixirLS": {
22-
"command": "elixir-ls",
23-
"filetypes": ["elixir", "eelixir"]
2415
}
2516
}
2617
}

nix/configuration.nix

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ in {
743743
exe = ''
744744
${pkgs.openarena}/bin/openarena \
745745
+set fs_homepath ~/.firejail/q3/.openarena \
746-
+set fs_game excessiveplus +set vm_cgame 2 +set vm_ui 2
746+
+set fs_game omega
747747
'';
748748
}
749749
// fj.mkFirejailCustom {
@@ -799,10 +799,21 @@ in {
799799
download --model Qwen2.5-Coder-0.5B
800800
'';
801801
}
802+
// fj.mkFirejailCustom {
803+
pkg = "tabby-agent";
804+
dir = "tabby";
805+
exe = "${
806+
import ./tabby-agent.nix {
807+
sock = "/home/${
808+
config.services.functora.userName
809+
}/.firejail/tabby/tabby.sock";
810+
}
811+
}/bin/tabby-agent";
812+
}
802813
// fj.mkFirejailCustom {
803814
pkg = "vi";
804815
exe = "${vi}/bin/vi";
805-
profile = pkgs.writeText "fjvi.local" ''
816+
profile = pkgs.writeText "vi.local" ''
806817
no3d
807818
nosound
808819
apparmor

nix/tabby-agent.nix

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{sock}: let
2+
pkgs = import ./nixpkgs.nix;
3+
unst = import ./nixpkgs-unstable.nix;
4+
in
5+
pkgs.writeShellApplication {
6+
name = "tabby-agent";
7+
text = ''
8+
${pkgs.socat}/bin/socat \
9+
TCP-LISTEN:8080,fork,reuseaddr,keepalive \
10+
UNIX:${sock},keepalive &
11+
12+
SOCAT_PID="$!"
13+
14+
cleanup() {
15+
kill "$SOCAT_PID" 2>/dev/null
16+
exit 0
17+
}
18+
19+
trap cleanup SIGINT SIGTERM EXIT
20+
21+
${unst.tabby-agent}/bin/tabby-agent "$@"
22+
23+
cleanup
24+
'';
25+
}

nix/tabby-services.nix

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ in [
88
pkg = "tabby-server";
99
dir = "tabby";
1010
cfg = ''
11-
env SWC_DEBUG=1
12-
env RUST_LOG=trace
11+
# env SWC_DEBUG=1
12+
# env RUST_LOG=trace
1313
env TABBY_DISABLE_USAGE_COLLECTION=1
1414
'';
1515
exe = ''
1616
${import ./tabby-socat.nix}/bin/tabby-socat \
17-
serve --model Qwen2.5-Coder-0.5B
17+
serve \
18+
--device vulkan \
19+
--model Qwen2.5-Coder-0.5B
1820
'';
1921
}
2022
)
@@ -23,8 +25,8 @@ in [
2325
srv = "tabby-socket";
2426
mkExe = config: ''
2527
${pkgs.socat}/bin/socat \
26-
TCP-LISTEN:8080,fork,reuseaddr,keepalive \
27-
UNIX:/home/${
28+
TCP-LISTEN:8080,fork,reuseaddr,keepalive \
29+
UNIX:/home/${
2830
config.services.functora.userName
2931
}/.firejail/tabby/tabby.sock,keepalive
3032
'';

pub/vi/nix/default.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
let
22
pkgs = import ./../../../nix/nixpkgs.nix;
3+
unst = import ./../../../nix/nixpkgs-unstable.nix;
34
in
45
{
56
mini ? true,
@@ -97,6 +98,11 @@ in
9798
coc-nvim
9899
sideways-vim
99100
vim-LanguageTool
101+
#
102+
# AI
103+
#
104+
nvim-lspconfig
105+
unst.vimPlugins.vim-tabby
100106
];
101107
opt = [
102108
];

pub/vi/vimrc.vim

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,3 +775,11 @@ let g:neoformat_toml_prettier = {
775775
\ 'stdin': 1,
776776
\ 'try_node_exe': 1,
777777
\ }
778+
779+
"
780+
" => Tabby
781+
"
782+
783+
let g:tabby_agent_start_command = ["tabby-agent", "--stdio"]
784+
let g:tabby_inline_completion_trigger = "auto"
785+
let g:tabby_inline_completion_keybinding_accept = '<C-CR>'

0 commit comments

Comments
 (0)