fix: some nix eval warnings
All checks were successful
Update Nix Packages with nix-update / nix-update (push) Successful in 46m52s

This commit is contained in:
m3tm3re
2026-03-28 10:08:36 +01:00
parent 0f2693a812
commit 564d209402
3 changed files with 71 additions and 75 deletions

View File

@@ -1,80 +1,86 @@
{ {
config, config,
lib, lib,
options,
pkgs, pkgs,
... ...
}: }:
with lib; let with lib; let
cfg = config.coding.editors; cfg = config.coding.editors;
# 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
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable",
lazypath,
})
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({
spec = {
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
{ import = "lazyvim.plugins.extras.lang.typescript" },
{ import = "lazyvim.plugins.extras.lang.python" },
{ import = "lazyvim.plugins.extras.lang.go" },
{ import = "lazyvim.plugins.extras.lang.nix" },
{ import = "lazyvim.plugins.extras.lang.rust" },
{ import = "lazyvim.plugins.extras.lang.nushell" },
{ "Mofiqul/dracula.nvim" },
},
defaults = { lazy = false, version = false },
install = { colorscheme = { "dracula", "tokyonight", "habamax" } },
checker = { enabled = false },
performance = {
rtp = {
disabled_plugins = {
"gzip", "tarPlugin", "tohtml", "tutor", "zipPlugin",
},
},
},
})
vim.o.termguicolors = true
vim.cmd.colorscheme("dracula")
'';
in { in {
options.coding.editors = { options.coding.editors = {
neovim = { neovim = {
enable = mkEnableOption "neovim with LazyVim configuration"; enable = mkEnableOption "neovim with LazyVim configuration";
}; };
zed = { zed = {
enable = mkEnableOption "zed editor with custom configuration"; enable = mkEnableOption "zed editor with custom configuration";
}; };
}; };
config = mkMerge [ config = mkMerge [
# Neovim configuration # Neovim configuration
(mkIf cfg.neovim.enable { (mkIf cfg.neovim.enable (mkMerge [
programs.neovim = { {
enable = true; programs.neovim = {
defaultEditor = true; enable = true;
viAlias = true; defaultEditor = true;
vimAlias = true; viAlias = true;
vimdiffAlias = true; vimAlias = true;
withNodeJs = true; vimdiffAlias = true;
withPython3 = true; withNodeJs = true;
withPython3 = true;
# This is your init.lua content (extraLuaConfig for compatibility with older home-manager) };
extraLuaConfig = '' }
-- Bootstrap lazy.nvim # Use initLua on HM 26.05+ (unstable), extraLuaConfig on HM ≤ 25.11 (stable)
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" (
if not vim.loop.fs_stat(lazypath) then if hasInitLua
vim.fn.system({ then {programs.neovim.initLua = lazyVimConfig;}
"git", else {programs.neovim.extraLuaConfig = lazyVimConfig;}
"clone", )
"--filter=blob:none", ]))
"https://github.com/folke/lazy.nvim.git",
"--branch=stable",
lazypath,
})
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({
spec = {
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
{ import = "lazyvim.plugins.extras.lang.typescript" },
{ import = "lazyvim.plugins.extras.lang.python" },
{ import = "lazyvim.plugins.extras.lang.go" },
{ import = "lazyvim.plugins.extras.lang.nix" },
{ import = "lazyvim.plugins.extras.lang.rust" },
{ import = "lazyvim.plugins.extras.lang.nushell" },
{ "Mofiqul/dracula.nvim" },
},
defaults = { lazy = false, version = false },
install = { colorscheme = { "dracula", "tokyonight", "habamax" } },
checker = { enabled = false },
performance = {
rtp = {
disabled_plugins = {
"gzip", "tarPlugin", "tohtml", "tutor", "zipPlugin",
},
},
},
})
vim.o.termguicolors = true
vim.cmd.colorscheme("dracula")
'';
};
})
# Zed editor configuration # Zed editor configuration
(mkIf cfg.zed.enable { (mkIf cfg.zed.enable {
programs.zed-editor = { programs.zed-editor = {
@@ -85,13 +91,11 @@ in {
ui_font_size = 16; ui_font_size = 16;
buffer_font_size = 16; buffer_font_size = 16;
buffer_font_family = "FiraCode Nerd Font"; buffer_font_family = "FiraCode Nerd Font";
# Editor Behavior # Editor Behavior
vim_mode = true; vim_mode = true;
auto_update = false; auto_update = false;
format_on_save = "on"; format_on_save = "on";
load_direnv = "shell_hook"; load_direnv = "shell_hook";
# AI Features # AI Features
features = { features = {
edit_prediction_provider = "zed"; edit_prediction_provider = "zed";
@@ -100,14 +104,12 @@ in {
mode = "subtle"; mode = "subtle";
}; };
show_edit_predictions = true; show_edit_predictions = true;
agent = { agent = {
default_model = { default_model = {
provider = "zed.dev"; provider = "zed.dev";
model = "claude-sonnet-4"; model = "claude-sonnet-4";
}; };
}; };
assistant = { assistant = {
version = "2"; version = "2";
default_model = { default_model = {
@@ -115,7 +117,6 @@ in {
model = "claude-4"; model = "claude-4";
}; };
}; };
# Language Models # Language Models
language_models = { language_models = {
anthropic = { anthropic = {
@@ -128,7 +129,6 @@ in {
api_url = "http://localhost:11434"; api_url = "http://localhost:11434";
}; };
}; };
# Languages Configuration # Languages Configuration
languages = { languages = {
Nix = { Nix = {
@@ -153,7 +153,6 @@ in {
}; };
}; };
}; };
# LSP Configuration # LSP Configuration
lsp = { lsp = {
rust-analyzer = { rust-analyzer = {
@@ -169,7 +168,6 @@ in {
}; };
}; };
}; };
# Context Servers # Context Servers
context_servers = { context_servers = {
some-context-server = { some-context-server = {
@@ -182,7 +180,6 @@ in {
env = {}; env = {};
}; };
}; };
# Privacy # Privacy
telemetry = { telemetry = {
metrics = false; metrics = false;
@@ -190,7 +187,6 @@ in {
}; };
}; };
}) })
# Common packages (always installed if either editor is enabled) # Common packages (always installed if either editor is enabled)
(mkIf (cfg.neovim.enable || cfg.zed.enable) { (mkIf (cfg.neovim.enable || cfg.zed.enable) {
home.packages = with pkgs; [zig]; home.packages = with pkgs; [zig];

View File

@@ -3,7 +3,7 @@
additions = final: prev: additions = final: prev:
(import ../pkgs {pkgs = final;}) (import ../pkgs {pkgs = final;})
# // (inputs.hyprpanel.overlay final prev) # // (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 # This one contains whatever you want to overlay
# You can change versions, add patches, set compilation flags, anything really. # You can change versions, add patches, set compilation flags, anything really.
@@ -35,35 +35,35 @@
temp-packages = final: _prev: { temp-packages = final: _prev: {
temp = import inputs.nixpkgs-9e9486b { temp = import inputs.nixpkgs-9e9486b {
system = final.system; system = final.stdenv.hostPlatform.system;
config.allowUnfree = true; config.allowUnfree = true;
}; };
}; };
stable-packages = final: _prev: { stable-packages = final: _prev: {
stable = import inputs.nixpkgs-stable { stable = import inputs.nixpkgs-stable {
system = final.system; system = final.stdenv.hostPlatform.system;
config.allowUnfree = true; config.allowUnfree = true;
}; };
}; };
pinned-packages = final: _prev: { pinned-packages = final: _prev: {
pinned = import inputs.nixpkgs-9472de4 { pinned = import inputs.nixpkgs-9472de4 {
system = final.system; system = final.stdenv.hostPlatform.system;
config.allowUnfree = true; config.allowUnfree = true;
}; };
}; };
locked-packages = final: _prev: { locked-packages = final: _prev: {
locked = import inputs.nixpkgs-locked { locked = import inputs.nixpkgs-locked {
system = final.system; system = final.stdenv.hostPlatform.system;
config.allowUnfree = true; config.allowUnfree = true;
}; };
}; };
master-packages = final: _prev: { master-packages = final: _prev: {
master = import inputs.nixpkgs-master { master = import inputs.nixpkgs-master {
system = final.system; system = final.stdenv.hostPlatform.system;
config.allowUnfree = true; config.allowUnfree = true;
}; };
}; };

View File

@@ -53,7 +53,7 @@ in
# OpenCode AI coding agent (if inputs are available) # OpenCode AI coding agent (if inputs are available)
] ]
++ lib.optionals (inputs != null) ++ lib.optionals (inputs != null)
[inputs.opencode.packages.${pkgs.system}.opencode] [inputs.opencode.packages.${pkgs.stdenv.hostPlatform.system}.opencode]
++ [ ++ [
# Task management for AI coding sessions # Task management for AI coding sessions
customPackages.td customPackages.td