misc: refactor imports, prefer adding helpers to args rather than importing it

This commit is contained in:
Gaetan Lepage 2023-11-06 15:04:08 +01:00 committed by Gaétan Lepage
parent 541b694873
commit b6724702b4
160 changed files with 697 additions and 736 deletions

View file

@ -1,12 +1,12 @@
{
pkgs,
config,
lib,
helpers,
config,
pkgs,
...
}:
with lib; let
cfg = config.plugins.diffview;
helpers = import ../helpers.nix {inherit lib;};
mkWinConfig = type: width: height: position:
with helpers.defaultNullOpts; {
type = mkEnum ["split" "float"] type ''

View file

@ -1,12 +1,12 @@
{
pkgs,
config,
lib,
helpers,
config,
pkgs,
...
}:
with lib; let
cfg = config.plugins.git-worktree;
helpers = import ../helpers.nix {inherit lib;};
in {
options = {
plugins.git-worktree = {

View file

@ -1,12 +1,12 @@
{
pkgs,
config,
lib,
helpers,
config,
pkgs,
...
}:
with lib; let
cfg = config.plugins.gitblame;
helpers = import ../helpers.nix {inherit lib;};
in {
options = {
plugins.gitblame = {

View file

@ -1,12 +1,12 @@
{
pkgs,
config,
lib,
helpers,
config,
pkgs,
...
}:
with lib; let
cfg = config.plugins.gitgutter;
helpers = import ../helpers.nix {inherit lib;};
in {
options = {
plugins.gitgutter = {

View file

@ -1,12 +1,11 @@
{
pkgs,
lib,
helpers,
config,
pkgs,
...
} @ args:
with lib; let
helpers = import ../helpers.nix args;
in {
}:
with lib; {
options.plugins.gitmessenger = {
enable = mkEnableOption "gitmessenger";

View file

@ -1,11 +1,11 @@
{
config,
lib,
helpers,
config,
pkgs,
...
} @ args:
}:
with lib; let
helpers = import ../helpers.nix args;
signOptions = defaults: {
hl =
helpers.defaultNullOpts.mkStr defaults.hl

View file

@ -1,12 +1,12 @@
{
config,
lib,
helpers,
config,
pkgs,
...
}:
with lib; let
cfg = config.plugins.neogit;
helpers = import ../helpers.nix {inherit lib;};
sectionDefaultsModule = types.submodule {
options = {