Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
511 B
Nix
Raw Permalink Normal View History

2025-10-09 14:15:47 +02:00
{
lib,
pkgs,
config,
modulesPath,
...
}:
let
settingsFormat = pkgs.formats.toml { };
in
{
options.settings = lib.mkOption {
type = lib.types.submoduleWith {
specialArgs = { inherit modulesPath; };
modules = [
{ freeformType = settingsFormat.type; }
];
};
default = { };
description = ''
Settings used to build a treefmt config file.
'';
};
config.configFile = lib.mkOptionDefault (settingsFormat.generate "treefmt.toml" config.settings);
}