[fix] nvim: system module broke plugins
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:
parent
ac5e62a37c
commit
ac30838621
6 changed files with 480 additions and 489 deletions
|
@ -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";
|
||||||
|
|
|
@ -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" = {};
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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)";
|
||||||
}
|
}
|
||||||
];
|
]
|
||||||
}
|
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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;
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue