From 817f6775b63b3c19407e5d0d8f6be8d478d1f368 Mon Sep 17 00:00:00 2001 From: Archit Gupta Date: Fri, 12 Jan 2024 01:26:03 -0800 Subject: [PATCH] Fix option type for formatter Since formatters are system dependent, the formatter option must be a function. --- builtinModules/formatter.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtinModules/formatter.nix b/builtinModules/formatter.nix index 6ba01ae..e62c965 100644 --- a/builtinModules/formatter.nix +++ b/builtinModules/formatter.nix @@ -5,13 +5,13 @@ { config, src, lib, flakelight, genSystems, ... }: let 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; in { options = { formatter = mkOption { - type = nullOr (optFunctionTo package); + type = nullOr (functionTo package); default = null; }; formatters = mkOption {