From 211344d65cd8c45c9b44d6c925949ffa48d4852b Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Mon, 27 Feb 2023 22:28:18 +0300 Subject: [PATCH] feat: apply new module format to tabline plugins --- modules/tabline/default.nix | 9 ++------- .../config.nix} | 4 ---- modules/tabline/nvim-bufferline/default.nix | 6 ++++++ .../tabline/nvim-bufferline/nvim-bufferline.nix | 14 ++++++++++++++ 4 files changed, 22 insertions(+), 11 deletions(-) rename modules/tabline/{nvim-bufferline.nix => nvim-bufferline/config.nix} (97%) create mode 100644 modules/tabline/nvim-bufferline/default.nix create mode 100644 modules/tabline/nvim-bufferline/nvim-bufferline.nix diff --git a/modules/tabline/default.nix b/modules/tabline/default.nix index 4d16dfb7..539302e2 100644 --- a/modules/tabline/default.nix +++ b/modules/tabline/default.nix @@ -1,10 +1,5 @@ -{ - pkgs, - lib, - config, - ... -}: { +_: { imports = [ - ./nvim-bufferline.nix + ./nvim-bufferline ]; } diff --git a/modules/tabline/nvim-bufferline.nix b/modules/tabline/nvim-bufferline/config.nix similarity index 97% rename from modules/tabline/nvim-bufferline.nix rename to modules/tabline/nvim-bufferline/config.nix index fca433f0..0d132c02 100644 --- a/modules/tabline/nvim-bufferline.nix +++ b/modules/tabline/nvim-bufferline/config.nix @@ -8,10 +8,6 @@ with lib; with builtins; let cfg = config.vim.tabline.nvimBufferline; in { - options.vim.tabline.nvimBufferline = { - enable = mkEnableOption "nvim-bufferline-lua"; - }; - config = mkIf cfg.enable ( let mouse = { diff --git a/modules/tabline/nvim-bufferline/default.nix b/modules/tabline/nvim-bufferline/default.nix new file mode 100644 index 00000000..8fe4868c --- /dev/null +++ b/modules/tabline/nvim-bufferline/default.nix @@ -0,0 +1,6 @@ +_: { + imports = [ + ./nvim-bufferline.nix + ./config.nix + ]; +} diff --git a/modules/tabline/nvim-bufferline/nvim-bufferline.nix b/modules/tabline/nvim-bufferline/nvim-bufferline.nix new file mode 100644 index 00000000..e9d897b8 --- /dev/null +++ b/modules/tabline/nvim-bufferline/nvim-bufferline.nix @@ -0,0 +1,14 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; +with builtins; let + cfg = config.vim.tabline.nvimBufferline; +in { + options.vim.tabline.nvimBufferline = { + enable = mkEnableOption "nvim-bufferline-lua"; + }; +}