feat: Change nix formatter to alejandra

This commit is contained in:
ulic-youthlic 2025-11-09 06:25:03 +08:00
parent 0b8b647f05
commit b4c3dfec42
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
229 changed files with 2528 additions and 2884 deletions

View file

@ -3,11 +3,9 @@
config,
options,
...
}:
let
}: let
cfg = config.youthlic;
in
{
in {
options = {
youthlic.plugins = lib.mkOption {
type = lib.types.attrsOf (
@ -16,8 +14,7 @@ in
name,
lib,
...
}:
{
}: {
freeformType = lib.types.anything;
options = {
enable = lib.mkEnableOption "nvimPlugins.${name}";
@ -25,13 +22,12 @@ in
}
)
);
default = { };
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;
@ -42,13 +38,13 @@ in
(lib.filter (name: options.plugins.${name} ? luaConfig))
(map (
name:
lib.nameValuePair name {
luaConfig.post =
#lua
''
_M.load("${name}")
'';
}
lib.nameValuePair name {
luaConfig.post =
#lua
''
_M.load("${name}")
'';
}
))
lib.listToAttrs
];