Add treefmt

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-02-16 18:53:11 +00:00
parent 22c82653dd
commit 2888bb8b72
70 changed files with 414 additions and 291 deletions

52
treefmt.nix Normal file
View File

@@ -0,0 +1,52 @@
{ ... }:
{
projectRootFile = "flake.nix";
programs = {
nixfmt = {
enable = true;
strict = true;
};
shellcheck.enable = true;
prettier.enable = true;
gofmt.enable = true;
};
settings = {
global = {
excludes = [
# Third-party
"submodules/*"
# Binary Files
"*.jpg"
"*.png"
"*.svg"
# Machine-generated
"*/secrets.yaml"
"*/secrets/*.pub"
# Theme Templates
"*/theme.css"
"*/theme.conf"
"*/theme.theme"
"*/theme.sass"
"*/*.kvconfig"
# Git
"*/.gitignore"
".gitattributes"
".envrc"
# One-offs
"hosts/*/users/*/uid"
"*/.stignore"
"*/spicetify/config/prefs*"
"*.zsh"
# Manifest Files
"*/package.json"
"*/go.mod"
"*/bun.lockb"
# Broken formatters
"*.lua"
];
};
};
}