From f081bb916f6a3900128167daba8eb02d6a89a440 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Mon, 27 Feb 2023 22:28:48 +0300 Subject: [PATCH] feat: apply new module format to session plugins --- modules/session/default.nix | 2 +- .../config.nix} | 4 ---- modules/session/nvim-session-manager/default.nix | 6 ++++++ .../nvim-session-manager/nvim-session-manager.nix | 14 ++++++++++++++ 4 files changed, 21 insertions(+), 5 deletions(-) rename modules/session/{nvim-session-manager.nix => nvim-session-manager/config.nix} (74%) create mode 100644 modules/session/nvim-session-manager/default.nix create mode 100644 modules/session/nvim-session-manager/nvim-session-manager.nix diff --git a/modules/session/default.nix b/modules/session/default.nix index 3a2da67..b984f72 100644 --- a/modules/session/default.nix +++ b/modules/session/default.nix @@ -1,5 +1,5 @@ _: { imports = [ - ./nvim-session-manager.nix + ./nvim-session-manager ]; } diff --git a/modules/session/nvim-session-manager.nix b/modules/session/nvim-session-manager/config.nix similarity index 74% rename from modules/session/nvim-session-manager.nix rename to modules/session/nvim-session-manager/config.nix index 29dd21d..4319b6c 100644 --- a/modules/session/nvim-session-manager.nix +++ b/modules/session/nvim-session-manager/config.nix @@ -8,10 +8,6 @@ with lib; with builtins; let cfg = config.vim.session.nvim-session-manager; in { - options.vim.session.nvim-session-manager = { - enable = mkEnableOption "Enable nvim-session-manager"; - }; - config = mkIf cfg.enable { vim.startPlugins = ["nvim-session-manager"]; diff --git a/modules/session/nvim-session-manager/default.nix b/modules/session/nvim-session-manager/default.nix new file mode 100644 index 0000000..607c453 --- /dev/null +++ b/modules/session/nvim-session-manager/default.nix @@ -0,0 +1,6 @@ +_: { + imports = [ + ./nvim-session-manager.nix + ./config.nix + ]; +} diff --git a/modules/session/nvim-session-manager/nvim-session-manager.nix b/modules/session/nvim-session-manager/nvim-session-manager.nix new file mode 100644 index 0000000..af7ca32 --- /dev/null +++ b/modules/session/nvim-session-manager/nvim-session-manager.nix @@ -0,0 +1,14 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; +with builtins; let + cfg = config.vim.session.nvim-session-manager; +in { + options.vim.session.nvim-session-manager = { + enable = mkEnableOption "Enable nvim-session-manager"; + }; +}