mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-25 13:14:37 +02:00
treewide: Reformat with nixfmt
This commit is contained in:
parent
c6281260dc
commit
62f32bfc71
459 changed files with 28139 additions and 26377 deletions
|
@ -1,37 +1,41 @@
|
|||
{modules, ...}: {
|
||||
{ modules, ... }:
|
||||
{
|
||||
_module.args = {
|
||||
modules = pkgs: let
|
||||
nixpkgsMaintainersList = pkgs.path + "/nixos/modules/misc/meta.nix";
|
||||
modules =
|
||||
pkgs:
|
||||
let
|
||||
nixpkgsMaintainersList = pkgs.path + "/nixos/modules/misc/meta.nix";
|
||||
|
||||
nixvimExtraArgsModule = rec {
|
||||
_file = ./flake.nix;
|
||||
key = _file;
|
||||
config = {
|
||||
_module.args = {
|
||||
pkgs = pkgs.lib.mkForce pkgs;
|
||||
inherit (pkgs) lib;
|
||||
nixvimExtraArgsModule = rec {
|
||||
_file = ./flake.nix;
|
||||
key = _file;
|
||||
config = {
|
||||
_module.args = {
|
||||
pkgs = pkgs.lib.mkForce pkgs;
|
||||
inherit (pkgs) lib;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
in [
|
||||
../modules
|
||||
nixpkgsMaintainersList
|
||||
nixvimExtraArgsModule
|
||||
({lib, ...}:
|
||||
with lib; {
|
||||
# Attribute may contain the following fields:
|
||||
# - name: Name of the module
|
||||
# - kind: Either colorschemes or plugins
|
||||
# - description: A short description of the plugin
|
||||
# - url: Url for the plugin
|
||||
#
|
||||
# [kind name] will identify the plugin
|
||||
#
|
||||
# We need to use an attrs instead of a submodule to handle the merge.
|
||||
options.meta.nixvimInfo = mkOption {
|
||||
type =
|
||||
(types.nullOr types.attrs)
|
||||
// {
|
||||
in
|
||||
[
|
||||
../modules
|
||||
nixpkgsMaintainersList
|
||||
nixvimExtraArgsModule
|
||||
(
|
||||
{ lib, ... }:
|
||||
with lib;
|
||||
{
|
||||
# Attribute may contain the following fields:
|
||||
# - name: Name of the module
|
||||
# - kind: Either colorschemes or plugins
|
||||
# - description: A short description of the plugin
|
||||
# - url: Url for the plugin
|
||||
#
|
||||
# [kind name] will identify the plugin
|
||||
#
|
||||
# We need to use an attrs instead of a submodule to handle the merge.
|
||||
options.meta.nixvimInfo = mkOption {
|
||||
type = (types.nullOr types.attrs) // {
|
||||
# This will create an attrset of the form:
|
||||
# {
|
||||
# "path"."to"."plugin" = { "<name>" = <info>; };
|
||||
|
@ -43,37 +47,41 @@
|
|||
# description = null or "<DESCRIPTION>";
|
||||
# url = null or "<URL>";
|
||||
# }
|
||||
merge = _: defs:
|
||||
lib.foldl' (acc: def:
|
||||
lib.recursiveUpdate acc {
|
||||
"${def.value.kind}"."${def.value.name}" = {
|
||||
inherit (def.value) url description;
|
||||
inherit (def) file;
|
||||
};
|
||||
}) {
|
||||
plugins = {};
|
||||
colorschemes = {};
|
||||
}
|
||||
defs;
|
||||
merge =
|
||||
_: defs:
|
||||
lib.foldl'
|
||||
(
|
||||
acc: def:
|
||||
lib.recursiveUpdate acc {
|
||||
"${def.value.kind}"."${def.value.name}" = {
|
||||
inherit (def.value) url description;
|
||||
inherit (def) file;
|
||||
};
|
||||
}
|
||||
)
|
||||
{
|
||||
plugins = { };
|
||||
colorschemes = { };
|
||||
}
|
||||
defs;
|
||||
};
|
||||
internal = true;
|
||||
default = null;
|
||||
description = ''
|
||||
Nixvim related information on the module
|
||||
'';
|
||||
};
|
||||
})
|
||||
];
|
||||
internal = true;
|
||||
default = null;
|
||||
description = ''
|
||||
Nixvim related information on the module
|
||||
'';
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
|
||||
perSystem = {
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
_module.args = {
|
||||
modules = modules pkgs;
|
||||
rawModules = modules;
|
||||
perSystem =
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
_module.args = {
|
||||
modules = modules pkgs;
|
||||
rawModules = modules;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue