From 7149c92d1e2b14840f4697dec8c53c1bf5c6785c Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Mon, 27 Feb 2023 22:29:01 +0300 Subject: [PATCH] feat: apply new module format to minimap plugins --- modules/minimap/codewindow/codewindow.nix | 14 ++++++++++++++ .../{codewindow.nix => codewindow/config.nix} | 4 ---- modules/minimap/codewindow/default.nix | 6 ++++++ modules/minimap/default.nix | 4 ++-- .../{minimap-vim.nix => minimap-vim/config.nix} | 4 ---- modules/minimap/minimap-vim/default.nix | 6 ++++++ modules/minimap/minimap-vim/minimap-vim.nix | 14 ++++++++++++++ 7 files changed, 42 insertions(+), 10 deletions(-) create mode 100644 modules/minimap/codewindow/codewindow.nix rename modules/minimap/{codewindow.nix => codewindow/config.nix} (81%) create mode 100644 modules/minimap/codewindow/default.nix rename modules/minimap/{minimap-vim.nix => minimap-vim/config.nix} (68%) create mode 100644 modules/minimap/minimap-vim/default.nix create mode 100644 modules/minimap/minimap-vim/minimap-vim.nix diff --git a/modules/minimap/codewindow/codewindow.nix b/modules/minimap/codewindow/codewindow.nix new file mode 100644 index 0000000..629a478 --- /dev/null +++ b/modules/minimap/codewindow/codewindow.nix @@ -0,0 +1,14 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; +with builtins; let + cfg = config.vim.minimap.codewindow; +in { + options.vim.minimap.codewindow = { + enable = mkEnableOption "Enable minimap-vim plugin"; + }; +} diff --git a/modules/minimap/codewindow.nix b/modules/minimap/codewindow/config.nix similarity index 81% rename from modules/minimap/codewindow.nix rename to modules/minimap/codewindow/config.nix index 099bc6d..c3f7dd5 100644 --- a/modules/minimap/codewindow.nix +++ b/modules/minimap/codewindow/config.nix @@ -8,10 +8,6 @@ with lib; with builtins; let cfg = config.vim.minimap.codewindow; in { - options.vim.minimap.codewindow = { - enable = mkEnableOption "Enable minimap-vim plugin"; - }; - config = mkIf cfg.enable { vim.startPlugins = [ "codewindow-nvim" diff --git a/modules/minimap/codewindow/default.nix b/modules/minimap/codewindow/default.nix new file mode 100644 index 0000000..f3f8a9a --- /dev/null +++ b/modules/minimap/codewindow/default.nix @@ -0,0 +1,6 @@ +_: { + imports = [ + ./codewindow.nix + ./config.nix + ]; +} diff --git a/modules/minimap/default.nix b/modules/minimap/default.nix index 0007404..5222d6d 100644 --- a/modules/minimap/default.nix +++ b/modules/minimap/default.nix @@ -5,7 +5,7 @@ ... }: { imports = [ - ./minimap-vim.nix - ./codewindow.nix + ./minimap-vim + ./codewindow ]; } diff --git a/modules/minimap/minimap-vim.nix b/modules/minimap/minimap-vim/config.nix similarity index 68% rename from modules/minimap/minimap-vim.nix rename to modules/minimap/minimap-vim/config.nix index f2f9609..15f1761 100644 --- a/modules/minimap/minimap-vim.nix +++ b/modules/minimap/minimap-vim/config.nix @@ -8,10 +8,6 @@ with lib; with builtins; let cfg = config.vim.minimap.minimap-vim; in { - options.vim.minimap.minimap-vim = { - enable = mkEnableOption "Enable minimap-vim plugin"; - }; - config = mkIf cfg.enable { vim.startPlugins = [ pkgs.code-minimap diff --git a/modules/minimap/minimap-vim/default.nix b/modules/minimap/minimap-vim/default.nix new file mode 100644 index 0000000..889184e --- /dev/null +++ b/modules/minimap/minimap-vim/default.nix @@ -0,0 +1,6 @@ +_: { + imports = [ + ./minimap-vim.nix + ./config.nix + ]; +} diff --git a/modules/minimap/minimap-vim/minimap-vim.nix b/modules/minimap/minimap-vim/minimap-vim.nix new file mode 100644 index 0000000..54fea92 --- /dev/null +++ b/modules/minimap/minimap-vim/minimap-vim.nix @@ -0,0 +1,14 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; +with builtins; let + cfg = config.vim.minimap.minimap-vim; +in { + options.vim.minimap.minimap-vim = { + enable = mkEnableOption "Enable minimap-vim plugin"; + }; +}