This commit is contained in:
2026-03-09 11:33:54 +00:00
parent 0d23f2b0f4
commit 5a5e5e9b67
7 changed files with 96 additions and 35 deletions

60
flake.lock generated
View File

@@ -114,11 +114,11 @@
}, },
"den": { "den": {
"locked": { "locked": {
"lastModified": 1773020651, "lastModified": 1773131302,
"narHash": "sha256-DlRAoa+Zr4GpdleJe2VO7MjZ4968ZinX/rxmR/w3cZo=", "narHash": "sha256-74bgLrcTvbL2A6NabH8wbU9OLmOCieF4oW4RscP0kBA=",
"owner": "vic", "owner": "vic",
"repo": "den", "repo": "den",
"rev": "0b1d99f746da5d7128e2bea5c1b9a88b9ea7b441", "rev": "69682fffa09d57fb8a8dbf367252dbedca023207",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -406,11 +406,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1772985285, "lastModified": 1773093840,
"narHash": "sha256-wEEmvfqJcl9J0wyMgMrj1TixOgInBW/6tLPhWGoZE3s=", "narHash": "sha256-u/96NoAyN8BSRuM3ZimGf7vyYgXa3pLx4MYWjokuoH4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "5be5d8245cbc7bc0c09fbb5f38f23f223c543f85", "rev": "bb014746edb2a98d975abde4dd40fa240de4cf86",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -422,11 +422,11 @@
"homebrew-cask": { "homebrew-cask": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1773047020, "lastModified": 1773120318,
"narHash": "sha256-Lr8GGHucz8vdtmrZMS/IKgIN4FHnDmyCbIqg6AVKR8o=", "narHash": "sha256-ddtD82ebxHylYGrJTsaBNTD3IdAqxLa3tOb7TT17jyg=",
"owner": "homebrew", "owner": "homebrew",
"repo": "homebrew-cask", "repo": "homebrew-cask",
"rev": "6371c7494eba40052a5ad29e3f53ba32b6f5fc9d", "rev": "26e89acf56923d08860d12eafaadce0b09af75e8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -438,11 +438,11 @@
"homebrew-core": { "homebrew-core": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1773048776, "lastModified": 1773127335,
"narHash": "sha256-YHzMRHb2snzuaeSEFP0AhhZeqb8Mcg9SQqBpc3xJHJU=", "narHash": "sha256-JkZRJ/wtO26/HS2wzCS+TGsJ1a5yE/WbfHuxTCeWRMo=",
"owner": "homebrew", "owner": "homebrew",
"repo": "homebrew-core", "repo": "homebrew-core",
"rev": "dd1a14ba30dd3d4ffc9abf0266ecda0842001c62", "rev": "b41f2ea915ba1ac862dae9d6dd05be5165c2d961",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -526,11 +526,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1773048396, "lastModified": 1773119472,
"narHash": "sha256-qtGG8mtoCXriW2ccxvQxWifjwSwTFWaAnhZagq0a/l4=", "narHash": "sha256-+b9fxAYJQSBAzBwRaRSZ55cT9/ae4w5ttg5VZIMTnRc=",
"owner": "numtide", "owner": "numtide",
"repo": "llm-agents.nix", "repo": "llm-agents.nix",
"rev": "f17d31cd025cdd10c8a72e1813e567cf0d06fcbd", "rev": "6cbeeae9fab23fa0de85930a733df478fbc955b4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -652,11 +652,11 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1772771118, "lastModified": 1772956932,
"narHash": "sha256-xWzaTvmmACR/SRWtABgI/Z97lcqwJAeoSd5QW1KdK1s=", "narHash": "sha256-M0yS4AafhKxPPmOHGqIV0iKxgNO8bHDWdl1kOwGBwRY=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e38213b91d3786389a446dfce4ff5a8aaf6012f2", "rev": "608d0cadfed240589a7eea422407a547ad626a14",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -668,11 +668,11 @@
}, },
"nixpkgs_5": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1773048815, "lastModified": 1773130883,
"narHash": "sha256-WgPqAMBpQOPdxeDx+w8uMqliPTknQxClEpxlZsSzf6o=", "narHash": "sha256-ruuDRr2C6EQslSo3F18twCT8NohBDmGrJc8Vx/vtEJQ=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ab709aeb112ebbc33ec809690f32c75a0726e228", "rev": "1075022b7574ef1bf9dbdb7e6b1ae73010aa4c2c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -753,11 +753,11 @@
"nono": { "nono": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1773040967, "lastModified": 1773124061,
"narHash": "sha256-9UcBf9QhgVE6jlR4jdcSabEi2S2u7bi9Kk2FrhQs+3g=", "narHash": "sha256-XR8gC1mrTsKQNi75qhhyGSGBqtHEMZuaoFxRhvuFIwQ=",
"owner": "always-further", "owner": "always-further",
"repo": "nono", "repo": "nono",
"rev": "9e036bb1262df9ef18cf47d06d08a42491741bce", "rev": "5990443ce1afce21330aa8971b7b9a86cb8e8a44",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -891,11 +891,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1772944399, "lastModified": 1773096132,
"narHash": "sha256-xTzsSd3r5HBeufSZ3fszAn0ldfKctvsYG7tT2YJg5gY=", "narHash": "sha256-M3zEnq9OElB7zqc+mjgPlByPm1O5t2fbUrH3t/Hm5Ag=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "c8e69670b316d6788e435a3aa0bda74eb1b82cc0", "rev": "d1ff3b1034d5bab5d7d8086a7803c5a5968cd784",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1079,11 +1079,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1771148613, "lastModified": 1773119656,
"narHash": "sha256-nLzdw8jskekSRrunxBDCA0NCHr/2aJjcXqZ1Fcqm5eY=", "narHash": "sha256-AE6SthrvDyUU70myW7wAq4mzQbtmK5Spng7Y/OdCdhI=",
"owner": "dj95", "owner": "dj95",
"repo": "zjstatus", "repo": "zjstatus",
"rev": "7a039f56da80681408454d6e175fde3f54b9e592", "rev": "e80d508ffbff6ab6b39a481ae9986109d3c313ac",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -5,6 +5,7 @@
./options.nix ./options.nix
./plugins/blink-cmp.nix ./plugins/blink-cmp.nix
./plugins/conform.nix ./plugins/conform.nix
./plugins/fff.nix
./plugins/grug-far.nix ./plugins/grug-far.nix
./plugins/harpoon.nix ./plugins/harpoon.nix
./plugins/hunk.nix ./plugins/hunk.nix
@@ -12,6 +13,7 @@
./plugins/lsp.nix ./plugins/lsp.nix
./plugins/mini.nix ./plugins/mini.nix
./plugins/oil.nix ./plugins/oil.nix
./plugins/opencode.nix
./plugins/toggleterm.nix ./plugins/toggleterm.nix
./plugins/treesitter.nix ./plugins/treesitter.nix
./plugins/zk.nix ./plugins/zk.nix

View File

@@ -66,13 +66,13 @@
{ {
mode = "n"; mode = "n";
key = "<leader>ff"; key = "<leader>ff";
action = ":Pick files<CR>"; action.__raw = "function() require('fff').find_files() end";
options.desc = "Search files"; options.desc = "Search files";
} }
{ {
mode = "n"; mode = "n";
key = "<leader>fg"; key = "<leader>fg";
action = ":Pick grep_live<CR>"; action.__raw = "function() require('fff').live_grep() end";
options.desc = "Grep"; options.desc = "Grep";
} }
{ {

View File

@@ -0,0 +1,8 @@
{pkgs, ...}: {
programs.nixvim = {
extraPlugins = [pkgs.vimPlugins.fff-nvim];
extraConfigLua = ''
require('fff').setup({})
'';
};
}

View File

@@ -30,6 +30,8 @@
{ mode = 'n', keys = '<Leader>g', desc = '+Git' }, { mode = 'n', keys = '<Leader>g', desc = '+Git' },
{ mode = 'n', keys = '<Leader>l', desc = '+LSP' }, { mode = 'n', keys = '<Leader>l', desc = '+LSP' },
{ mode = 'x', keys = '<Leader>l', desc = '+LSP' }, { mode = 'x', keys = '<Leader>l', desc = '+LSP' },
{ mode = 'n', keys = '<Leader>o', desc = '+OpenCode' },
{ mode = 'x', keys = '<Leader>o', desc = '+OpenCode' },
require("mini.clue").gen_clues.builtin_completion(), require("mini.clue").gen_clues.builtin_completion(),
require("mini.clue").gen_clues.g(), require("mini.clue").gen_clues.g(),
require("mini.clue").gen_clues.marks(), require("mini.clue").gen_clues.marks(),

View File

@@ -0,0 +1,34 @@
{pkgs, ...}: let
opencode-nvim = pkgs.vimUtils.buildVimPlugin {
pname = "opencode-nvim";
version = "unstable-2026-03-07";
src = pkgs.fetchFromGitHub {
owner = "sudo-tee";
repo = "opencode.nvim";
rev = "dffa3f39a8251c7ba53b1544d8536b5f51b4e90d";
hash = "sha256-KxIuToMpyo/Yi4xKirMV8Fznlma6EL1k4YQm5MQdGw4=";
};
doCheck = false;
};
in {
programs.nixvim = {
extraPlugins = with pkgs.vimPlugins; [
opencode-nvim
plenary-nvim
render-markdown-nvim
];
extraConfigLua = ''
require('render-markdown').setup({
anti_conceal = { enabled = false },
file_types = { 'markdown', 'opencode_output' },
})
require('opencode').setup({
server = {
url = 'http://127.0.0.1',
port = 18822,
auto_kill = false,
},
})
'';
};
}

View File

@@ -61,7 +61,7 @@
}; };
home.shellAliases = { home.shellAliases = {
noc = "nono run -s --allow-cwd --profile opencode --network-profile developer --allow ~/.bun --allow ~/.local/share/opensrc --proxy-allow models.dev --proxy-allow mcp.grep.app --proxy-allow mcp.context7.com --proxy-allow mcp.exa.ai -- opencode"; noc = "nono run -s --allow-cwd --profile opencode --allow ~/.bun --allow ~/.local/share/opensrc --allow ~/.config/jj --network-profile developer --proxy-allow models.dev --proxy-allow chatgpt.com --proxy-allow mcp.grep.app --proxy-allow mcp.context7.com --proxy-allow mcp.exa.ai -- opencode";
}; };
home.packages = [ home.packages = [
@@ -69,6 +69,21 @@
pkgs.nono pkgs.nono
]; ];
systemd.user.services.opencode-server = {
Unit = {
Description = "OpenCode AI server";
After = ["default.target"];
};
Service = {
ExecStart = "${inputs'.llm-agents.packages.opencode}/bin/opencode serve --port 18822";
Restart = "on-failure";
RestartSec = 5;
};
Install = {
WantedBy = ["default.target"];
};
};
xdg.configFile = { xdg.configFile = {
"opencode/agent" = { "opencode/agent" = {
source = ./_opencode/agent; source = ./_opencode/agent;