fix(nvim): use unstable pkgset #105

Merged
jalil merged 1 commit from nixvim-use-unstable into main 2024-10-14 09:35:30 +02:00
6 changed files with 40 additions and 21 deletions

View file

@ -2,10 +2,17 @@
{ {
flake.nixosModules = flake.nixosModules =
let let
nvim-config.imports = [ nvim-config =
inputs.nixvim.homeManagerModules.nixvim { pkgs, ... }:
../nvim {
]; imports = [
inputs.nixvim.homeManagerModules.nixvim
(import ../nvim {
inherit (inputs) unstable;
inherit (pkgs) system;
})
];
};
homeManagerModuleSandalone = import ../home { homeManagerModuleSandalone = import ../home {
inherit nvim-config; inherit nvim-config;
inherit (inputs) stylix; inherit (inputs) stylix;

View file

@ -9,7 +9,11 @@
nixvim = inputs.nixvim.legacyPackages.${system}; nixvim = inputs.nixvim.legacyPackages.${system};
module = { module = {
inherit pkgs; inherit pkgs;
module = ../nvim/standalone.nix; extraSpecialArgs = {
inherit (inputs) unstable;
inherit system;
};
module = import ../nvim/standalone.nix { standalone = true; };
}; };
in in
{ {

View file

@ -17,8 +17,6 @@
inherit (unstablePkgs) inherit (unstablePkgs)
gitoxide gitoxide
jujutsu jujutsu
neovim-unwrapped
ruff # nixpkgs stable version is improperly configured by nixvim
# wezterm # wezterm
; ;
}; };

View file

@ -1,3 +1,4 @@
{ system, unstable }:
{ lib, config, ... }: { lib, config, ... }:
let let
cfg = config.jhome.nvim; cfg = config.jhome.nvim;
@ -6,8 +7,9 @@ in
imports = [ ./options.nix ]; imports = [ ./options.nix ];
config.programs.nixvim = lib.mkMerge [ config.programs.nixvim = lib.mkMerge [
./standalone.nix (import ./standalone.nix { standalone = false; })
(lib.mkIf cfg.enable { (lib.mkIf cfg.enable {
nixpkgs = lib.mkForce { pkgs = import unstable { inherit system; }; };
enable = true; enable = true;
defaultEditor = lib.mkDefault true; defaultEditor = lib.mkDefault true;
}) })

View file

@ -183,7 +183,7 @@ in
servers = { servers = {
bashls = { bashls = {
enable = true; enable = true;
package = pkgs.unstable.bash-language-server; package = pkgs.bash-language-server;
}; };
# clangd.enable = true; # Adds ~2GiB # clangd.enable = true; # Adds ~2GiB
# html.enable = true; # Not writing html # html.enable = true; # Not writing html

View file

@ -1,4 +1,11 @@
{ pkgs, ... }: { standalone }:
{
pkgs,
system,
unstable,
lib,
...
}:
{ {
imports = [ imports = [
./options.nix ./options.nix
@ -8,6 +15,7 @@
]; ];
config = { config = {
nixpkgs = lib.optionalAttrs standalone { pkgs = import unstable { inherit system; }; };
globals.mapleader = " "; globals.mapleader = " ";
# Appearance # Appearance
colorschemes.gruvbox = { colorschemes.gruvbox = {
@ -42,8 +50,8 @@
}; };
extraPlugins = extraPlugins =
let let
plugins = pkgs.unstable.vimPlugins; plugins = pkgs.vimPlugins;
extraPlugins = import ./extraPlugins { pkgs = pkgs.unstable; }; extraPlugins = import ./extraPlugins { inherit pkgs; };
in in
[ [
plugins.nui-nvim plugins.nui-nvim
@ -53,15 +61,15 @@
]; ];
# Formatting & linters # Formatting & linters
extraPackages = [ extraPackages = [
pkgs.unstable.luajitPackages.jsregexp pkgs.luajitPackages.jsregexp
pkgs.unstable.shfmt pkgs.shfmt
pkgs.unstable.silicon pkgs.silicon
pkgs.unstable.statix pkgs.statix
pkgs.unstable.stylua pkgs.stylua
pkgs.unstable.taplo pkgs.taplo
pkgs.unstable.typos pkgs.typos
pkgs.unstable.yamlfmt pkgs.yamlfmt
(pkgs.unstable.python3.withPackages (p: [ p.jupytext ])) (pkgs.python3.withPackages (p: [ p.jupytext ]))
]; ];
extraConfigLuaPre = extraConfigLuaPre =
# lua # lua