Reformat nix source file using nixfmt
This commit is contained in:
parent
2e4a532958
commit
9201969c1b
220 changed files with 3169 additions and 2487 deletions
115
treefmt.nix
115
treefmt.nix
|
|
@ -1,60 +1,69 @@
|
|||
{
|
||||
perSystem = {pkgs, ...}: {
|
||||
treefmt = {
|
||||
programs = {
|
||||
alejandra = {
|
||||
enable = true;
|
||||
excludes = ["_sources/*.nix"];
|
||||
};
|
||||
biome = {
|
||||
enable = true;
|
||||
includes = ["*.json"];
|
||||
excludes = ["_sources/*.json"];
|
||||
settings = {
|
||||
javascript.formatter.enabled = false;
|
||||
css.formatter.enabled = false;
|
||||
perSystem =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
treefmt = {
|
||||
programs = {
|
||||
nixfmt = {
|
||||
enable = true;
|
||||
excludes = [ "_sources/*.nix" ];
|
||||
};
|
||||
};
|
||||
dprint = {
|
||||
enable = true;
|
||||
includes = ["*.md" "*.toml" "*.yaml"];
|
||||
excludes = ["secrets/*.yaml"];
|
||||
settings = {
|
||||
plugins = pkgs.dprint-plugins.getPluginList (plugins:
|
||||
with plugins; [
|
||||
dprint-plugin-toml
|
||||
dprint-plugin-markdown
|
||||
g-plane-pretty_yaml
|
||||
]);
|
||||
biome = {
|
||||
enable = true;
|
||||
includes = [ "*.json" ];
|
||||
excludes = [ "_sources/*.json" ];
|
||||
settings = {
|
||||
javascript.formatter.enabled = false;
|
||||
css.formatter.enabled = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
just = {
|
||||
enable = true;
|
||||
includes = [".justfile"];
|
||||
};
|
||||
typos = let
|
||||
config = ./.typos.toml |> builtins.readFile |> builtins.fromTOML;
|
||||
in {
|
||||
enable = true;
|
||||
includes = ["*"];
|
||||
excludes = ["assets/*"] ++ config.files.extend-exclude;
|
||||
configFile = toString ./.typos.toml;
|
||||
# Disable all extra option in treefmt module.
|
||||
# Use config file.
|
||||
sort = false;
|
||||
isolated = false;
|
||||
hidden = false;
|
||||
noIgnore = false;
|
||||
noIgnoreDot = false;
|
||||
noIgnoreGlobal = false;
|
||||
noIgnoreParent = false;
|
||||
noIgnoreVCS = false;
|
||||
binary = false;
|
||||
noCheckFilenames = false;
|
||||
noCheckFiles = false;
|
||||
noUnicode = false;
|
||||
dprint = {
|
||||
enable = true;
|
||||
includes = [
|
||||
"*.md"
|
||||
"*.toml"
|
||||
"*.yaml"
|
||||
];
|
||||
excludes = [ "secrets/*.yaml" ];
|
||||
settings = {
|
||||
plugins = pkgs.dprint-plugins.getPluginList (
|
||||
plugins: with plugins; [
|
||||
dprint-plugin-toml
|
||||
dprint-plugin-markdown
|
||||
g-plane-pretty_yaml
|
||||
]
|
||||
);
|
||||
};
|
||||
};
|
||||
just = {
|
||||
enable = true;
|
||||
includes = [ ".justfile" ];
|
||||
};
|
||||
typos =
|
||||
let
|
||||
config = ./.typos.toml |> builtins.readFile |> builtins.fromTOML;
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
includes = [ "*" ];
|
||||
excludes = [ "assets/*" ] ++ config.files.extend-exclude;
|
||||
configFile = toString ./.typos.toml;
|
||||
# Disable all extra option in treefmt module.
|
||||
# Use config file.
|
||||
sort = false;
|
||||
isolated = false;
|
||||
hidden = false;
|
||||
noIgnore = false;
|
||||
noIgnoreDot = false;
|
||||
noIgnoreGlobal = false;
|
||||
noIgnoreParent = false;
|
||||
noIgnoreVCS = false;
|
||||
binary = false;
|
||||
noCheckFilenames = false;
|
||||
noCheckFiles = false;
|
||||
noUnicode = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue