diff --git a/modules/terminal/default.nix b/modules/terminal/default.nix index 228f3ff..c8bbc22 100644 --- a/modules/terminal/default.nix +++ b/modules/terminal/default.nix @@ -1,5 +1,5 @@ _: { imports = [ - ./toggleterm.nix + ./toggleterm ]; } diff --git a/modules/terminal/toggleterm.nix b/modules/terminal/toggleterm/config.nix similarity index 68% rename from modules/terminal/toggleterm.nix rename to modules/terminal/toggleterm/config.nix index 7c7f5b5..89ed51c 100644 --- a/modules/terminal/toggleterm.nix +++ b/modules/terminal/toggleterm/config.nix @@ -8,20 +8,6 @@ with lib; with builtins; let cfg = config.vim.terminal.toggleterm; in { - options.vim.terminal.toggleterm = { - enable = mkEnableOption "Enable toggleterm as a replacement to built-in terminal command"; - direction = mkOption { - type = types.enum ["horizontal" "vertical" "tab" "float"]; - default = "float"; - description = "Direction of the terminal"; - }; - enable_winbar = mkOption { - type = types.bool; - default = false; - description = "Enable winbar"; - }; - }; - config = mkIf cfg.enable { vim.startPlugins = [ "toggleterm-nvim" diff --git a/modules/terminal/toggleterm/default.nix b/modules/terminal/toggleterm/default.nix new file mode 100644 index 0000000..a540f3f --- /dev/null +++ b/modules/terminal/toggleterm/default.nix @@ -0,0 +1,6 @@ +_: { + imports = [ + ./toggleterm.nix + ./config.nix + ]; +} diff --git a/modules/terminal/toggleterm/toggleterm.nix b/modules/terminal/toggleterm/toggleterm.nix new file mode 100644 index 0000000..3383780 --- /dev/null +++ b/modules/terminal/toggleterm/toggleterm.nix @@ -0,0 +1,24 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; +with builtins; let + cfg = config.vim.terminal.toggleterm; +in { + options.vim.terminal.toggleterm = { + enable = mkEnableOption "Enable toggleterm as a replacement to built-in terminal command"; + direction = mkOption { + type = types.enum ["horizontal" "vertical" "tab" "float"]; + default = "horizontal"; + description = "Direction of the terminal"; + }; + enable_winbar = mkOption { + type = types.bool; + default = false; + description = "Enable winbar"; + }; + }; +}