[fix] nvim: system module broke plugins
All checks were successful
/ check (push) Successful in 24s
/ build (docs) (push) Successful in 2s
/ build (nixosConfigurations.vm.config.system.build.toplevel) (push) Successful in 2s
/ build (nvim) (push) Successful in 13s

The architecture of nixvim doesn't let me use NixOS modules T-T, I need
to use manual imports instead.
This commit is contained in:
Jalil David Salamé Messina 2024-06-22 19:25:51 +02:00
parent ac5e62a37c
commit ac30838621
Signed by: jalil
GPG key ID: F016B9E770737A0B
6 changed files with 480 additions and 489 deletions

View file

@ -250,8 +250,8 @@
system, system,
}: { }: {
default = pkgs.mkShell { default = pkgs.mkShell {
buildInputs = with pkgs; [ buildInputs = [
just pkgs.just
self.packages.${system}.nvim self.packages.${system}.nvim
]; ];
QEMU_OPTS_WL = "--enable-kvm -smp 4 -device virtio-gpu-rutabaga,gfxstream-vulkan=on,cross-domain=on,hostmem=2G,wsi=headless"; QEMU_OPTS_WL = "--enable-kvm -smp 4 -device virtio-gpu-rutabaga,gfxstream-vulkan=on,cross-domain=on,hostmem=2G,wsi=headless";

View file

@ -1,13 +1,6 @@
{ {helpers, ...}: let
lib,
config,
helpers,
...
}: let
inherit (helpers) mkRaw; inherit (helpers) mkRaw;
cfg = config.jhome.nvim; in {
in
lib.mkIf cfg.enable {
autoGroups = { autoGroups = {
"highlightOnYank" = {}; "highlightOnYank" = {};
"lspConfig" = {}; "lspConfig" = {};

View file

@ -1,5 +1,14 @@
{pkgs, ...} @ opts: { {
lib,
pkgs,
config,
helpers,
...
}: let
# Force inputs to be included
nixvim = import ./nixvim.nix {inherit lib pkgs config helpers;};
in {
imports = [./options.nix]; imports = [./options.nix];
config.programs.nixvim = (import ./nixvim.nix opts).config; config.programs.nixvim = nixvim.config;
} }

View file

@ -1,15 +1,6 @@
{ {helpers, ...}: let
lib,
config,
helpers,
...
}: let
inherit (helpers) mkRaw; inherit (helpers) mkRaw;
in [
cfg = config.jhome.nvim;
in
lib.mkIf cfg.enable {
keymaps = [
# Quickfix # Quickfix
{ {
mode = "n"; mode = "n";
@ -154,5 +145,4 @@ in
action = mkRaw "require('nvim-silicon').clip"; action = mkRaw "require('nvim-silicon').clip";
options.desc = "Snap Code (to clipboard)"; options.desc = "Snap Code (to clipboard)";
} }
]; ]
}

View file

@ -10,14 +10,18 @@
darwinAvailable = args ? darwinConfig; darwinAvailable = args ? darwinConfig;
canSetAsDefault = hmAvailable || nixosAvailable; canSetAsDefault = hmAvailable || nixosAvailable;
notStandalone = hmAvailable || nixosAvailable || darwinAvailable; notStandalone = hmAvailable || nixosAvailable || darwinAvailable;
augroups = import ./augroups.nix args;
in { in {
imports = [./options.nix ./plugins.nix ./mappings.nix ./augroups.nix]; imports = [./options.nix];
config = lib.mkMerge [ config = lib.mkMerge [
(lib.optionalAttrs canSetAsDefault {defaultEditor = lib.mkDefault true;}) (lib.optionalAttrs canSetAsDefault {defaultEditor = lib.mkDefault true;})
(lib.optionalAttrs notStandalone {enable = lib.mkDefault true;}) (lib.optionalAttrs notStandalone {enable = lib.mkDefault true;})
(lib.mkIf cfg.enable { (lib.mkIf cfg.enable {
package = pkgs.unstable.neovim-unwrapped; package = pkgs.unstable.neovim-unwrapped;
inherit (augroups) autoGroups autoCmd;
plugins = import ./plugins.nix args;
keymaps = import ./mappings.nix args;
globals.mapleader = " "; globals.mapleader = " ";
# Appearance # Appearance
colorschemes.gruvbox = { colorschemes.gruvbox = {

View file

@ -2,14 +2,10 @@
lib, lib,
pkgs, pkgs,
helpers, helpers,
config,
... ...
}: let }: let
inherit (helpers) mkRaw; inherit (helpers) mkRaw;
cfg = config.jhome.nvim; in {
in
lib.mkIf cfg.enable {
plugins = {
bacon = { bacon = {
enable = true; enable = true;
settings.quickfix.enabled = true; settings.quickfix.enabled = true;
@ -243,5 +239,4 @@ in
enable = true; enable = true;
settings.auto_close = true; settings.auto_close = true;
}; };
};
} }