fix: some nix eval warnings
All checks were successful
Update Nix Packages with nix-update / nix-update (push) Successful in 46m52s
All checks were successful
Update Nix Packages with nix-update / nix-update (push) Successful in 46m52s
This commit is contained in:
@@ -1,36 +1,16 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
options,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.coding.editors;
|
||||
in {
|
||||
options.coding.editors = {
|
||||
neovim = {
|
||||
enable = mkEnableOption "neovim with LazyVim configuration";
|
||||
};
|
||||
|
||||
zed = {
|
||||
enable = mkEnableOption "zed editor with custom configuration";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
# Neovim configuration
|
||||
(mkIf cfg.neovim.enable {
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
withNodeJs = true;
|
||||
withPython3 = true;
|
||||
|
||||
# This is your init.lua content (extraLuaConfig for compatibility with older home-manager)
|
||||
extraLuaConfig = ''
|
||||
# home-manager 26.05+ renamed extraLuaConfig → initLua.
|
||||
# On stable 25.11 initLua does not exist; fall back to extraLuaConfig.
|
||||
hasInitLua = options.programs.neovim ? initLua;
|
||||
lazyVimConfig = ''
|
||||
-- Bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
@@ -44,7 +24,6 @@ in {
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Bootstrap LazyVim via lazy.nvim
|
||||
-- Docs: https://github.com/folke/lazy.nvim and https://www.lazyvim.org/
|
||||
require("lazy").setup({
|
||||
@@ -72,9 +51,36 @@ in {
|
||||
vim.o.termguicolors = true
|
||||
vim.cmd.colorscheme("dracula")
|
||||
'';
|
||||
in {
|
||||
options.coding.editors = {
|
||||
neovim = {
|
||||
enable = mkEnableOption "neovim with LazyVim configuration";
|
||||
};
|
||||
})
|
||||
|
||||
zed = {
|
||||
enable = mkEnableOption "zed editor with custom configuration";
|
||||
};
|
||||
};
|
||||
config = mkMerge [
|
||||
# Neovim configuration
|
||||
(mkIf cfg.neovim.enable (mkMerge [
|
||||
{
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
withNodeJs = true;
|
||||
withPython3 = true;
|
||||
};
|
||||
}
|
||||
# Use initLua on HM 26.05+ (unstable), extraLuaConfig on HM ≤ 25.11 (stable)
|
||||
(
|
||||
if hasInitLua
|
||||
then {programs.neovim.initLua = lazyVimConfig;}
|
||||
else {programs.neovim.extraLuaConfig = lazyVimConfig;}
|
||||
)
|
||||
]))
|
||||
# Zed editor configuration
|
||||
(mkIf cfg.zed.enable {
|
||||
programs.zed-editor = {
|
||||
@@ -85,13 +91,11 @@ in {
|
||||
ui_font_size = 16;
|
||||
buffer_font_size = 16;
|
||||
buffer_font_family = "FiraCode Nerd Font";
|
||||
|
||||
# Editor Behavior
|
||||
vim_mode = true;
|
||||
auto_update = false;
|
||||
format_on_save = "on";
|
||||
load_direnv = "shell_hook";
|
||||
|
||||
# AI Features
|
||||
features = {
|
||||
edit_prediction_provider = "zed";
|
||||
@@ -100,14 +104,12 @@ in {
|
||||
mode = "subtle";
|
||||
};
|
||||
show_edit_predictions = true;
|
||||
|
||||
agent = {
|
||||
default_model = {
|
||||
provider = "zed.dev";
|
||||
model = "claude-sonnet-4";
|
||||
};
|
||||
};
|
||||
|
||||
assistant = {
|
||||
version = "2";
|
||||
default_model = {
|
||||
@@ -115,7 +117,6 @@ in {
|
||||
model = "claude-4";
|
||||
};
|
||||
};
|
||||
|
||||
# Language Models
|
||||
language_models = {
|
||||
anthropic = {
|
||||
@@ -128,7 +129,6 @@ in {
|
||||
api_url = "http://localhost:11434";
|
||||
};
|
||||
};
|
||||
|
||||
# Languages Configuration
|
||||
languages = {
|
||||
Nix = {
|
||||
@@ -153,7 +153,6 @@ in {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# LSP Configuration
|
||||
lsp = {
|
||||
rust-analyzer = {
|
||||
@@ -169,7 +168,6 @@ in {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Context Servers
|
||||
context_servers = {
|
||||
some-context-server = {
|
||||
@@ -182,7 +180,6 @@ in {
|
||||
env = {};
|
||||
};
|
||||
};
|
||||
|
||||
# Privacy
|
||||
telemetry = {
|
||||
metrics = false;
|
||||
@@ -190,7 +187,6 @@ in {
|
||||
};
|
||||
};
|
||||
})
|
||||
|
||||
# Common packages (always installed if either editor is enabled)
|
||||
(mkIf (cfg.neovim.enable || cfg.zed.enable) {
|
||||
home.packages = with pkgs; [zig];
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
additions = final: prev:
|
||||
(import ../pkgs {pkgs = final;})
|
||||
# // (inputs.hyprpanel.overlay final prev)
|
||||
// {rose-pine-hyprcursor = inputs.rose-pine-hyprcursor.packages.${prev.system}.default;};
|
||||
// {rose-pine-hyprcursor = inputs.rose-pine-hyprcursor.packages.${prev.stdenv.hostPlatform.system}.default;};
|
||||
|
||||
# This one contains whatever you want to overlay
|
||||
# You can change versions, add patches, set compilation flags, anything really.
|
||||
@@ -35,35 +35,35 @@
|
||||
|
||||
temp-packages = final: _prev: {
|
||||
temp = import inputs.nixpkgs-9e9486b {
|
||||
system = final.system;
|
||||
system = final.stdenv.hostPlatform.system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
stable-packages = final: _prev: {
|
||||
stable = import inputs.nixpkgs-stable {
|
||||
system = final.system;
|
||||
system = final.stdenv.hostPlatform.system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
pinned-packages = final: _prev: {
|
||||
pinned = import inputs.nixpkgs-9472de4 {
|
||||
system = final.system;
|
||||
system = final.stdenv.hostPlatform.system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
locked-packages = final: _prev: {
|
||||
locked = import inputs.nixpkgs-locked {
|
||||
system = final.system;
|
||||
system = final.stdenv.hostPlatform.system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
master-packages = final: _prev: {
|
||||
master = import inputs.nixpkgs-master {
|
||||
system = final.system;
|
||||
system = final.stdenv.hostPlatform.system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -53,7 +53,7 @@ in
|
||||
# OpenCode AI coding agent (if inputs are available)
|
||||
]
|
||||
++ lib.optionals (inputs != null)
|
||||
[inputs.opencode.packages.${pkgs.system}.opencode]
|
||||
[inputs.opencode.packages.${pkgs.stdenv.hostPlatform.system}.opencode]
|
||||
++ [
|
||||
# Task management for AI coding sessions
|
||||
customPackages.td
|
||||
|
||||
Reference in New Issue
Block a user