about summary refs log tree commit diff stats
path: root/modules/by-name/nv/nvim/module.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/by-name/nv/nvim/module.nix')
-rw-r--r--modules/by-name/nv/nvim/module.nix41
1 files changed, 28 insertions, 13 deletions
diff --git a/modules/by-name/nv/nvim/module.nix b/modules/by-name/nv/nvim/module.nix
index f394db3b..81d7febf 100644
--- a/modules/by-name/nv/nvim/module.nix
+++ b/modules/by-name/nv/nvim/module.nix
@@ -11,17 +11,27 @@
   pkgs,
   lib,
   config,
+  modules,
+  libraries,
   ...
 }: let
   cfg = config.soispha.programs.nvim;
+
+  plgs = builtins.attrValues (libraries.extra.mkByName {
+    useShards = false;
+    baseDirectory = ./plgs;
+    fileName = "default.nix";
+  });
 in {
-  imports = [
-    ./autocmds
-    ./clipboard
-    ./mappings
-    ./options
-    ./plgs
-  ];
+  imports =
+    [
+      ./autocmds
+      ./clipboard
+      ./mappings
+      ./options
+      ./performance
+    ]
+    ++ plgs;
 
   options.soispha.programs.nvim = {
     enable = lib.mkEnableOption "custom nvim config";
@@ -33,11 +43,16 @@ in {
 
   config = lib.mkIf cfg.enable {
     home-manager.users.soispha = {
+      imports = [
+        modules.nixvim.homeModules.nixvim
+      ];
+
       home.sessionVariables = {
         EDITOR = "nvim";
         VISUAL = "nvim";
         CODEEDITOR = "nvim";
       };
+
       programs.nixvim = {
         enable = true;
 
@@ -58,21 +73,21 @@ in {
           ---------------------------------------------------------------------------
         '';
 
-        extraPackages = with pkgs; [
+        extraPackages = [
           /*
           These are mostly linters and formatters used for different file types.
           Including them here is fine, as they are not necessarily-sync able to different people.
           */
           # nix
-          alejandra
-          statix
+          pkgs.alejandra
+          pkgs.statix
 
           # yaml
-          yamllint
+          pkgs.yamllint
 
           # shell
-          shellcheck
-          shfmt
+          pkgs.shellcheck
+          pkgs.shfmt
         ];
       };
     };