Fix option type for formatter

Since formatters are system dependent, the formatter option must be a
function.
This commit is contained in:
Archit Gupta 2024-01-12 01:26:03 -08:00
parent 9099db6c84
commit 817f6775b6

View File

@ -5,13 +5,13 @@
{ config, src, lib, flakelight, genSystems, ... }: { config, src, lib, flakelight, genSystems, ... }:
let let
inherit (lib) mkDefault mkMerge mkOption mkIf mapAttrsToList; inherit (lib) mkDefault mkMerge mkOption mkIf mapAttrsToList;
inherit (lib.types) lazyAttrsOf nullOr package str; inherit (lib.types) functionTo lazyAttrsOf nullOr package str;
inherit (flakelight.types) optFunctionTo; inherit (flakelight.types) optFunctionTo;
in in
{ {
options = { options = {
formatter = mkOption { formatter = mkOption {
type = nullOr (optFunctionTo package); type = nullOr (functionTo package);
default = null; default = null;
}; };
formatters = mkOption { formatters = mkOption {