wip: using custom-flakes implementation

This commit is contained in:
Jeremy Wall 2025-05-05 12:56:57 -04:00
parent 22b2647aea
commit 74fb7a2b4c
3 changed files with 271 additions and 108 deletions

View File

@ -20,6 +20,22 @@
"type": "github" "type": "github"
} }
}, },
"avante-src": {
"flake": false,
"locked": {
"lastModified": 1746602870,
"narHash": "sha256-REBOplEe2muqfVLwcpTAmXpTrHlzSfhbh8T0litDTDA=",
"owner": "yetone",
"repo": "avante.nvim",
"rev": "113913355a6b9c0fbd62cf52d0cf3e5671d0e34a",
"type": "github"
},
"original": {
"owner": "yetone",
"repo": "avante.nvim",
"type": "github"
}
},
"clio-flake": { "clio-flake": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
@ -46,6 +62,7 @@
}, },
"custom-flakes": { "custom-flakes": {
"inputs": { "inputs": {
"avante-src": "avante-src",
"d2-vim-src": "d2-vim-src", "d2-vim-src": "d2-vim-src",
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_3",
"gomod2nix-src": "gomod2nix-src", "gomod2nix-src": "gomod2nix-src",
@ -67,11 +84,11 @@
"zig-src": "zig-src" "zig-src": "zig-src"
}, },
"locked": { "locked": {
"lastModified": 1746458473, "lastModified": 1746633381,
"narHash": "sha256-3FFhJ18MJFlHHI1YaMKRwXURcQjmLenxIcLFtr+CjGI=", "narHash": "sha256-9Vgnz0/Myw+XdZUxNWYhfdfRzz1SSDQIFjrhaXFcJpk=",
"owner": "zaphar", "owner": "zaphar",
"repo": "nix-flakes", "repo": "nix-flakes",
"rev": "91588e10769e706024d8d03ebb4958c89e00c264", "rev": "30a4fb242f5e6542b842be1972d953d20945ed7a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -223,6 +240,38 @@
} }
}, },
"flake-compat_4": { "flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_5": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_6": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1648199409, "lastModified": 1648199409,
@ -238,7 +287,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_5": { "flake-compat_7": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1673956053, "lastModified": 1673956053,
@ -275,6 +324,48 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"neovim-nightly-overlay",
"nixpkgs"
]
},
"locked": {
"lastModified": 1743550720,
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": [
"neovim-nightly-overlay",
"hercules-ci-effects",
"nixpkgs"
]
},
"locked": {
"lastModified": 1743550720,
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
"type": "github"
},
"original": {
"id": "flake-parts",
"type": "indirect"
}
},
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@ -297,24 +388,6 @@
"inputs": { "inputs": {
"systems": "systems_9" "systems": "systems_9"
}, },
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_11": {
"inputs": {
"systems": "systems_10"
},
"locked": { "locked": {
"lastModified": 1687709756, "lastModified": 1687709756,
"narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=",
@ -329,7 +402,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_12": { "flake-utils_11": {
"locked": { "locked": {
"lastModified": 1649676176, "lastModified": 1649676176,
"narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=", "narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=",
@ -344,9 +417,9 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_13": { "flake-utils_12": {
"inputs": { "inputs": {
"systems": "systems_11" "systems": "systems_10"
}, },
"locked": { "locked": {
"lastModified": 1705309234, "lastModified": 1705309234,
@ -362,9 +435,9 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_14": { "flake-utils_13": {
"inputs": { "inputs": {
"systems": "systems_12" "systems": "systems_11"
}, },
"locked": { "locked": {
"lastModified": 1726560853, "lastModified": 1726560853,
@ -380,9 +453,9 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_15": { "flake-utils_14": {
"inputs": { "inputs": {
"systems": "systems_13" "systems": "systems_12"
}, },
"locked": { "locked": {
"lastModified": 1681202837, "lastModified": 1681202837,
@ -539,7 +612,52 @@
"type": "github" "type": "github"
} }
}, },
"git-hooks": {
"inputs": {
"flake-compat": "flake-compat_5",
"gitignore": "gitignore",
"nixpkgs": [
"neovim-nightly-overlay",
"nixpkgs"
]
},
"locked": {
"lastModified": 1746537231,
"narHash": "sha256-Wb2xeSyOsCoTCTj7LOoD6cdKLEROyFAArnYoS+noCWo=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "fa466640195d38ec97cf0493d6d6882bc4d14969",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": { "gitignore": {
"inputs": {
"nixpkgs": [
"neovim-nightly-overlay",
"git-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"gitignore_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"sile-flake", "sile-flake",
@ -618,6 +736,28 @@
"type": "github" "type": "github"
} }
}, },
"hercules-ci-effects": {
"inputs": {
"flake-parts": "flake-parts_3",
"nixpkgs": [
"neovim-nightly-overlay",
"nixpkgs"
]
},
"locked": {
"lastModified": 1744693102,
"narHash": "sha256-1Z4WPGVky4w3lrhrgs89OKsLzPdtkbi1bPLNFWsoLfY=",
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"rev": "5b6cec51c9ec095a0d3fd4c8eeb53eb5c59ae33e",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -867,24 +1007,42 @@
"type": "github" "type": "github"
} }
}, },
"neovim-flake": { "neovim-nightly-overlay": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_10", "flake-compat": "flake-compat_4",
"nixpkgs": "nixpkgs_12" "flake-parts": "flake-parts_2",
"git-hooks": "git-hooks",
"hercules-ci-effects": "hercules-ci-effects",
"neovim-src": "neovim-src",
"nixpkgs": "nixpkgs_12",
"treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"dir": "contrib", "lastModified": 1746693006,
"lastModified": 1715862872, "narHash": "sha256-IztZLDIwNOvJCxqnBmaU7/oEjOBLJZgmLoK0ikQGQkM=",
"narHash": "sha256-FCOipXHkAbkuFw9JjEpOIJ8BkyMkjkI0Dp+SzZ4yZlw=", "owner": "nix-community",
"owner": "neovim", "repo": "neovim-nightly-overlay",
"repo": "neovim", "rev": "b969e3c7bfcb7a438382dd6e379788f762094df5",
"rev": "27fb62988e922c2739035f477f93cc052a4fee1e", "type": "github"
},
"original": {
"owner": "nix-community",
"repo": "neovim-nightly-overlay",
"type": "github"
}
},
"neovim-src": {
"flake": false,
"locked": {
"lastModified": 1746661883,
"narHash": "sha256-kjIDvE1KGhACcvAJGLgzaQDkenH8dN9Hapfc0/b/3bQ=",
"owner": "neovim",
"repo": "neovim",
"rev": "1b8ae4336db86ff95998223cc6bd8e07229d237d",
"type": "github" "type": "github"
}, },
"original": { "original": {
"dir": "contrib",
"owner": "neovim", "owner": "neovim",
"ref": "stable",
"repo": "neovim", "repo": "neovim",
"type": "github" "type": "github"
} }
@ -911,7 +1069,7 @@
}, },
"nil-flake_2": { "nil-flake_2": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_11", "flake-utils": "flake-utils_10",
"nixpkgs": "nixpkgs_13", "nixpkgs": "nixpkgs_13",
"rust-overlay": "rust-overlay_6" "rust-overlay": "rust-overlay_6"
}, },
@ -995,16 +1153,16 @@
}, },
"nixpkgs_12": { "nixpkgs_12": {
"locked": { "locked": {
"lastModified": 1715787315, "lastModified": 1746576598,
"narHash": "sha256-cYApT0NXJfqBkKcci7D9Kr4CBYZKOQKDYA23q8XNuWg=", "narHash": "sha256-FshoQvr6Aor5SnORVvh/ZdJ1Sa2U4ZrIMwKBX5k2wu0=",
"owner": "nixos", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "33d1e753c82ffc557b4a585c77de43d4c922ebb5", "rev": "b3582c75c7f21ce0b429898980eddbbf05c68e55",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "NixOS",
"ref": "nixos-unstable", "ref": "nixpkgs-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -1282,7 +1440,7 @@
"jujutsu-flake": "jujutsu-flake", "jujutsu-flake": "jujutsu-flake",
"mcphub-flake": "mcphub-flake", "mcphub-flake": "mcphub-flake",
"neogit-src": "neogit-src_2", "neogit-src": "neogit-src_2",
"neovim-flake": "neovim-flake", "neovim-nightly-overlay": "neovim-nightly-overlay",
"nil-flake": "nil-flake_2", "nil-flake": "nil-flake_2",
"nixpkgs": "nixpkgs_14", "nixpkgs": "nixpkgs_14",
"nixpkgs-darwin": "nixpkgs-darwin", "nixpkgs-darwin": "nixpkgs-darwin",
@ -1332,8 +1490,8 @@
}, },
"runwhen-flake": { "runwhen-flake": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_4", "flake-compat": "flake-compat_6",
"flake-utils": "flake-utils_12", "flake-utils": "flake-utils_11",
"naersk": "naersk_5" "naersk": "naersk_5"
}, },
"locked": { "locked": {
@ -1375,7 +1533,7 @@
}, },
"rust-overlay-flake": { "rust-overlay-flake": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_13", "flake-utils": "flake-utils_12",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
@ -1530,7 +1688,7 @@
}, },
"sheetsui-flake": { "sheetsui-flake": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_14", "flake-utils": "flake-utils_13",
"naersk": "naersk_6", "naersk": "naersk_6",
"nixpkgs": "nixpkgs_18", "nixpkgs": "nixpkgs_18",
"rust-overlay": "rust-overlay_7" "rust-overlay": "rust-overlay_7"
@ -1551,9 +1709,9 @@
}, },
"sile-flake": { "sile-flake": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_5", "flake-compat": "flake-compat_7",
"flake-utils": "flake-utils_15", "flake-utils": "flake-utils_14",
"gitignore": "gitignore", "gitignore": "gitignore_2",
"libtexpdf-src": "libtexpdf-src", "libtexpdf-src": "libtexpdf-src",
"nixpkgs": "nixpkgs_19" "nixpkgs": "nixpkgs_19"
}, },
@ -1631,21 +1789,6 @@
"type": "github" "type": "github"
} }
}, },
"systems_13": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": { "systems_2": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
@ -1782,6 +1925,27 @@
"type": "github" "type": "github"
} }
}, },
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"neovim-nightly-overlay",
"nixpkgs"
]
},
"locked": {
"lastModified": 1746216483,
"narHash": "sha256-4h3s1L/kKqt3gMDcVfN8/4v2jqHrgLIe4qok4ApH5x4=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "29ec5026372e0dec56f890e50dbe4f45930320fd",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"treesitter-context": { "treesitter-context": {
"flake": false, "flake": false,
"locked": { "locked": {

View File

@ -30,12 +30,7 @@
url = "github:oxalica/rust-overlay"; url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
neovim-flake = {
url = "github:neovim/neovim/stable?dir=contrib";
# NOTE(jeremy): Currently this needs a newer nixpkgs version
#inputs.nixpkgs.follows = "nixpkgs";
};
jujutsu-flake.url = "github:martinvonz/jj"; jujutsu-flake.url = "github:martinvonz/jj";
custom-flakes = { custom-flakes = {
url = "github:zaphar/nix-flakes"; url = "github:zaphar/nix-flakes";
@ -80,7 +75,7 @@
custom-flakes, custom-flakes,
unstable, unstable,
heracles-flake, heracles-flake,
neovim-flake, neovim-nightly-overlay,
clio-flake, clio-flake,
sheetsui-flake, sheetsui-flake,
mcphub-flake, mcphub-flake,
@ -90,6 +85,7 @@
vimModule = system: let vimModule = system: let
nil-pkg = nil-flake.packages."${system}".default; nil-pkg = nil-flake.packages."${system}".default;
mcp-hub-binary = custom-flakes.packages."${system}".mcp-hub; mcp-hub-binary = custom-flakes.packages."${system}".mcp-hub;
notion-mcp-server = custom-flakes.packages."${system}".notion-mcp-server;
in in
{ config, pkgs, ...}: let { config, pkgs, ...}: let
unstablePkgs = import unstable { inherit system; }; unstablePkgs = import unstable { inherit system; };
@ -110,7 +106,6 @@
nvim-treesitter-context = custom-flakes.packages."${system}".nvim-treesitter-context; nvim-treesitter-context = custom-flakes.packages."${system}".nvim-treesitter-context;
roslyn-nvim = custom-flakes.packages."${system}".roslyn-nvim; roslyn-nvim = custom-flakes.packages."${system}".roslyn-nvim;
ionide-nvim = custom-flakes.packages."${system}".ionide-nvim; ionide-nvim = custom-flakes.packages."${system}".ionide-nvim;
nvim = neovim-flake.packages."${system}".neovim;
# TODO(zaphar): Until nixpkgs update to a newer version of tree-sitter the queries will be wrong # TODO(zaphar): Until nixpkgs update to a newer version of tree-sitter the queries will be wrong
# for csharp # for csharp
#tree-sitter-csharp = pkgs.callPackage ./nvim-treesitter-csharp.nix { #tree-sitter-csharp = pkgs.callPackage ./nvim-treesitter-csharp.nix {
@ -124,38 +119,15 @@
# inherit (pkgs) fetchFromGitHub; # inherit (pkgs) fetchFromGitHub;
#}; #};
mcphub-nvim = mcphub-flake.packages."${system}".default; mcphub-nvim = mcphub-flake.packages."${system}".default;
in { my-neovim = pkgs.wrapNeovim unstablePkgs.neovim-unwrapped {
imports = [ configure = {
./program-neovim.nix
];
config = {
environment.variables = {
EDITOR="nvim";
PAGER="less -R";
OMNISHARP_BIN = "${pkgs.omnisharp-roslyn}/bin/OmniSharp";
};
nixpkgs.overlays = [
(final: prev: {
custom-neovim = nvim;
lorri = unstablePkgs.lorri;
avante-nvim = unstablePkgs.vimPlugins.avante-nvim;
copilot-lua = unstablePkgs.vimPlugins.copilot-lua;
})
];
programs = with pkgs; {
neovim.enable = true;
neovim.vimAlias = true;
neovim.viAlias = true;
neovim.package = pkgs.custom-neovim;
neovim.configure = {
customRC = "lua << EOF customRC = "lua << EOF
${builtins.readFile ./init.lua} ${builtins.readFile ./init.lua}
EOF"; EOF";
packages.myVimPackage = { packages.myPlugins = {
start = (with pkgs.vimPlugins; [ start = (with pkgs.vimPlugins; [
copilot-lua copilot-lua
avante-nvim custom-flakes.packages."${system}".avante-nvim
vim-sile vim-sile
nvim-tree-lua nvim-tree-lua
nvim-lspconfig nvim-lspconfig
@ -235,6 +207,23 @@ EOF";
}; };
}; };
}; };
in {
imports = [
./program-neovim.nix
];
config = {
environment.variables = {
EDITOR="nvim";
PAGER="less -R";
OMNISHARP_BIN = "${pkgs.omnisharp-roslyn}/bin/OmniSharp";
};
nixpkgs.overlays = [
(final: prev: {
lorri = unstablePkgs.lorri;
copilot-lua = unstablePkgs.vimPlugins.copilot-lua;
})
];
environment.systemPackages = (with pkgs; [ environment.systemPackages = (with pkgs; [
terraform-ls terraform-ls
nodePackages.typescript-language-server nodePackages.typescript-language-server
@ -251,6 +240,8 @@ EOF";
devenv devenv
unstablePkgs.fq unstablePkgs.fq
mcp-hub-binary mcp-hub-binary
notion-mcp-server
my-neovim
]); ]);
}; };
}; };

View File

@ -737,8 +737,8 @@ require('copilot').setup();
require('avante').setup({ require('avante').setup({
provider = "claude", provider = "claude",
mode = "planning",
cursor_applying_provider = nil, -- default to whatever provider is configured cursor_applying_provider = nil, -- default to whatever provider is configured
mode = "agentic",
claude = { claude = {
endpoint = "https://api.anthropic.com", endpoint = "https://api.anthropic.com",
model = "claude-3-7-sonnet-20250219", model = "claude-3-7-sonnet-20250219",
@ -749,6 +749,14 @@ require('avante').setup({
copilot = { copilot = {
model = "claude-3.7-sonnet", model = "claude-3.7-sonnet",
}, },
rag_service = {
enabled = false,
host_mount = os.getenv("HOME"), -- Host mount path for the rag service
provider = "ollama", -- The provider to use for RAG service (e.g. openai or ollama)
llm_model = "llama3", -- The LLM model to use for RAG service
embed_model = "", -- The embedding model to use for RAG service
endpoint = "http://localhost:11434", -- The API endpoint for RAG service
},
behavior = { behavior = {
enable_cursor_planning_mode = true, enable_cursor_planning_mode = true,
}, },