about summary refs log tree commit diff stats
path: root/modules/by-name/nv/nvim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/by-name/nv/nvim/module.nix23
-rw-r--r--modules/by-name/nv/nvim/plgs/comment-nvim/default.nix1
-rw-r--r--modules/by-name/nv/nvim/plgs/default.nix42
3 files changed, 17 insertions, 49 deletions
diff --git a/modules/by-name/nv/nvim/module.nix b/modules/by-name/nv/nvim/module.nix
index 819646d6..817fda70 100644
--- a/modules/by-name/nv/nvim/module.nix
+++ b/modules/by-name/nv/nvim/module.nix
@@ -12,17 +12,25 @@
   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
+    ]
+    ++ plgs;
 
   options.soispha.programs.nvim = {
     enable = lib.mkEnableOption "custom nvim config";
@@ -43,6 +51,7 @@ in {
         VISUAL = "nvim";
         CODEEDITOR = "nvim";
       };
+
       programs.nixvim = {
         enable = true;
 
diff --git a/modules/by-name/nv/nvim/plgs/comment-nvim/default.nix b/modules/by-name/nv/nvim/plgs/comment-nvim/default.nix
index b404843e..68a88d32 100644
--- a/modules/by-name/nv/nvim/plgs/comment-nvim/default.nix
+++ b/modules/by-name/nv/nvim/plgs/comment-nvim/default.nix
@@ -26,6 +26,7 @@ in {
         };
       };
     };
+
     keymaps = [
       {
         key = "gcc";
diff --git a/modules/by-name/nv/nvim/plgs/default.nix b/modules/by-name/nv/nvim/plgs/default.nix
deleted file mode 100644
index aaebb3b1..00000000
--- a/modules/by-name/nv/nvim/plgs/default.nix
+++ /dev/null
@@ -1,42 +0,0 @@
-# nixos-config - My current NixOS configuration
-#
-# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
-# SPDX-License-Identifier: GPL-3.0-or-later
-#
-# This file is part of my nixos-config.
-#
-# You should have received a copy of the License along with this program.
-# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
-{...}: {
-  imports =
-    [
-      # Plugins not yet packaged in nixpkgs
-      # ./debugprint
-      ./lf-nvim
-      # ./lsp-progress-nvim
-    ]
-    ++ [
-      # Already packaged in nixpkgs
-      ./colorscheme
-      ./comment-nvim
-      ./femaco
-      ./flatten-nvim
-      ./goto-preview
-      ./harpoon
-      ./leap
-      ./lsp
-      ./lspkind
-      ./ltex_extra
-      ./lualine
-      ./luasnip
-      ./neorg
-      ./nvim-cmp
-      ./nvim-lint
-      ./raw_plugins
-      ./telescope
-      ./todo-comments
-      ./treesitter
-      ./vim-tex
-      ./which-key
-    ];
-}