plugins/netman: remove with lib; and helpers

This commit is contained in:
Austin Horstman 2024-12-12 17:53:25 -06:00
parent 6fcf389a8d
commit 1d0404ff43
No known key found for this signature in database

View file

@ -1,14 +1,12 @@
{ {
lib, lib,
helpers,
config, config,
pkgs, pkgs,
... ...
}: }:
with lib;
{ {
options.plugins.netman = { options.plugins.netman = {
enable = mkEnableOption "netman.nvim, a framework to access remote resources"; enable = lib.mkEnableOption "netman.nvim, a framework to access remote resources";
package = lib.mkPackageOption pkgs "netman.nvim" { package = lib.mkPackageOption pkgs "netman.nvim" {
default = [ default = [
@ -17,19 +15,19 @@ with lib;
]; ];
}; };
neoTreeIntegration = mkEnableOption "support for netman as a neo-tree source"; neoTreeIntegration = lib.mkEnableOption "support for netman as a neo-tree source";
}; };
config = config =
let let
cfg = config.plugins.netman; cfg = config.plugins.netman;
in in
mkIf cfg.enable { lib.mkIf cfg.enable {
extraPlugins = [ cfg.package ]; extraPlugins = [ cfg.package ];
extraConfigLua = '' extraConfigLua = ''
require("netman") require("netman")
''; '';
plugins.neo-tree.extraSources = mkIf cfg.neoTreeIntegration [ "netman.ui.neo-tree" ]; plugins.neo-tree.extraSources = lib.mkIf cfg.neoTreeIntegration [ "netman.ui.neo-tree" ];
}; };
} }