Reformat nix source file using nixfmt
This commit is contained in:
parent
2e4a532958
commit
9201969c1b
220 changed files with 3169 additions and 2487 deletions
|
|
@ -3,27 +3,35 @@
|
|||
config,
|
||||
options,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.plugins = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.submodule ({
|
||||
name,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
freeformType = lib.types.anything;
|
||||
options = {
|
||||
enable = lib.mkEnableOption "nvimPlugins.${name}";
|
||||
};
|
||||
}));
|
||||
default = {};
|
||||
type = lib.types.attrsOf (
|
||||
lib.types.submodule (
|
||||
{
|
||||
name,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
freeformType = lib.types.anything;
|
||||
options = {
|
||||
enable = lib.mkEnableOption "nvimPlugins.${name}";
|
||||
};
|
||||
}
|
||||
)
|
||||
);
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
config = let
|
||||
enabledPlugins = lib.filterAttrs (_name: value: value.enable) cfg.plugins;
|
||||
in
|
||||
config =
|
||||
let
|
||||
enabledPlugins = lib.filterAttrs (_name: value: value.enable) cfg.plugins;
|
||||
in
|
||||
lib.mkMerge [
|
||||
{
|
||||
plugins = enabledPlugins;
|
||||
|
|
@ -32,14 +40,16 @@ in {
|
|||
plugins = lib.pipe enabledPlugins [
|
||||
builtins.attrNames
|
||||
(lib.filter (name: options.plugins.${name} ? luaConfig))
|
||||
(map (name:
|
||||
(map (
|
||||
name:
|
||||
lib.nameValuePair name {
|
||||
luaConfig.post =
|
||||
#lua
|
||||
''
|
||||
_M.load("${name}")
|
||||
'';
|
||||
}))
|
||||
}
|
||||
))
|
||||
lib.listToAttrs
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue