Something went wrong. Try again.
my over complex system configurations
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168{ lib, writeShellScriptBin, treefmt,
# keep-sorted start actionlint, deadnix, keep-sorted, locker, nixfmt, shellcheck, shfmt, statix, stylua, taplo, typos, yamlfmt, zizmor, # keep-sorted end}:treefmt.withConfig { runtimeInputs = [ # keep-sorted start actionlint deadnix keep-sorted locker nixfmt shellcheck shfmt statix stylua taplo typos 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 = [ "*" ]; };
locker = { command = "locker"; includes = [ "flake.lock" ]; };
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" ]; };
typos = { command = "typos"; options = [ "--write-changes" ]; includes = [ "*.nix" "*.md" ]; excludes = [ # weird option names "home/isabel/discord.nix" # colors "modules/nixos/catppuccin.nix" # driver name "modules/nixos/hardware/gpu/nvidia.nix" ]; };
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 }; };}