Something went wrong. Try again.
my over complex system configurations
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139{ lib, treefmt, actionlint, deadnix, keep-sorted, nixfmt, shellcheck, shfmt, statix, taplo, yamlfmt, zizmor, stylua, writeShellScriptBin,}:treefmt.withConfig { runtimeInputs = [ # keep-sorted start actionlint deadnix keep-sorted nixfmt shellcheck shfmt statix stylua taplo yamlfmt zizmor # keep-sorted end
(writeShellScriptBin "statix-fix" '' for file in "$@"; do ${lib.getExe statix} fix "$file" done '') ];
settings = { on-unmatched = "info"; tree-root-file = "flake.nix";
excludes = [ "secrets/*" ];
formatter = { # keep-sorted start block=yes newline_separated=yes actionlint = { command = "actionlint"; includes = [ ".github/workflows/*.yml" ".github/workflows/*.yaml" ]; };
deadnix = { command = "deadnix"; options = [ "--edit" ]; includes = [ "*.nix" ]; };
keep-sorted = { command = "keep-sorted"; includes = [ "*" ]; };
nixfmt = { command = "nixfmt"; includes = [ "*.nix" ]; };
shellcheck = { command = "shellcheck"; includes = [ "*.sh" "*.bash" # direnv "*.envrc" "*.envrc.*" ]; };
shfmt = { command = "shfmt"; options = [ "-s" "-w" "-i" "2" ]; includes = [ "*.sh" "*.bash" # direnv "*.envrc" "*.envrc.*" ]; };
statix = { command = "statix-fix"; includes = [ "*.nix" ]; };
stylua = { command = "stylua"; includes = [ "*.lua" ]; };
taplo = { command = "taplo"; options = "format"; includes = [ "*.toml" ]; };
yamlfmt = { command = "yamlfmt"; options = [ "-formatter" "retain_line_breaks_single=true" ]; includes = [ "*.yml" "*.yaml" ]; };
zizmor = { command = "zizmor"; includes = [ ".github/workflows/*.yml" ".github/workflows/*.yaml" ]; }; # keep-sorted end }; };}