nixos-runner/treefmt.nix

38 lines
684 B
Nix

_: {
settings = {
# General config
# allow-missing-formatter = true;
on-unmatched = "debug";
global.excludes = [
# lock files
"*.lock"
];
formatter.actionlint = {
options = [
"-config-file"
".forgejo/actionlint.yaml"
];
includes = [
".forgejo/workflows/*.yml"
".forgejo/workflows/*.yaml"
];
};
formatter.yamlfmt.excludes = [
".forgejo/*"
];
};
programs = {
# Nix
deadnix.enable = true;
nixfmt.enable = true;
statix.enable = true;
# Config files
yamlfmt.enable = true;
# ActionLint/forgejo workflows
actionlint.enable = true;
};
}