{ perSystem = {pkgs, ...}: { formatter = pkgs.treefmt.withConfig { runtimeInputs = with pkgs; [ alejandra deadnix keep-sorted ]; settings = { on-unmatched = "info"; treeroot-command = "git rev-parse --show-toplevel"; "formatter.alejandra" = { command = "alejandra"; includes = ["*.nix"]; excludes = ["*/flake.nix" "flake.nix" "flake.lock"]; }; "formatter.deadnix" = { command = "deadnix"; options = ["--edit" "--no-lambda-arg" "--no-lambda-pattern-names"]; includes = ["*.nix"]; }; "formatter.keep-sorted" = { command = "keep-sorted"; includes = ["*"]; excludes = ["*/flake.nix" "flake.nix" "flake.lock"]; }; }; }; }; }