From 848fc5f57cddf631f5f8825e4331321fdf12dbdb Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Mon, 27 Feb 2023 22:28:28 +0300 Subject: [PATCH] feat: apply new module format to UI plugins --- modules/ui/default.nix | 2 +- modules/ui/{noice.nix => noice/config.nix} | 4 ---- modules/ui/noice/default.nix | 6 ++++++ modules/ui/noice/noice.nix | 14 ++++++++++++++ 4 files changed, 21 insertions(+), 5 deletions(-) rename modules/ui/{noice.nix => noice/config.nix} (96%) create mode 100644 modules/ui/noice/default.nix create mode 100644 modules/ui/noice/noice.nix diff --git a/modules/ui/default.nix b/modules/ui/default.nix index 26bc186..8f72316 100644 --- a/modules/ui/default.nix +++ b/modules/ui/default.nix @@ -1,5 +1,5 @@ _: { imports = [ - ./noice.nix + ./noice ]; } diff --git a/modules/ui/noice.nix b/modules/ui/noice/config.nix similarity index 96% rename from modules/ui/noice.nix rename to modules/ui/noice/config.nix index 394d0e4..9a57137 100644 --- a/modules/ui/noice.nix +++ b/modules/ui/noice/config.nix @@ -8,10 +8,6 @@ with lib; with builtins; let cfg = config.vim.ui.noice; in { - options.vim.ui.noice = { - enable = mkEnableOption "noice-nvim"; - }; - config = mkIf cfg.enable { vim.startPlugins = [ "noice-nvim" diff --git a/modules/ui/noice/default.nix b/modules/ui/noice/default.nix new file mode 100644 index 0000000..e808738 --- /dev/null +++ b/modules/ui/noice/default.nix @@ -0,0 +1,6 @@ +_: { + imports = [ + ./noice.nix + ./config.nix + ]; +} diff --git a/modules/ui/noice/noice.nix b/modules/ui/noice/noice.nix new file mode 100644 index 0000000..a88f8ed --- /dev/null +++ b/modules/ui/noice/noice.nix @@ -0,0 +1,14 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; +with builtins; let + cfg = config.vim.ui.noice; +in { + options.vim.ui.noice = { + enable = mkEnableOption "noice-nvim"; + }; +}