flake.nix: add treefmt-nix
Some checks failed
Check flake / build-amd64-linux (push) Failing after 1m21s

This commit is contained in:
2025-08-15 21:37:06 +01:00
parent a40e84ddb4
commit 77ca125bde
3 changed files with 51 additions and 10 deletions

View File

@@ -14,7 +14,10 @@
inputs.pre-commit-hooks.follows = "pre-commit-hooks";
};
deploy-rs.url = "github:serokell/deploy-rs";
deploy-rs = {
url = "github:serokell/deploy-rs";
inputs.nixpkgs.follows = "nixpkgs";
};
devshell = {
url = "github:numtide/devshell";
@@ -95,6 +98,11 @@
url = "github:rafaelmardojai/thunderbird-gnome-theme";
flake = false;
};
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
@@ -108,6 +116,7 @@
inputs.agenix-rekey.flakeModule
inputs.pre-commit-hooks.flakeModule
inputs.nix-topology.flakeModule
inputs.treefmt-nix.flakeModule
./nix/devshell.nix
./nix/hosts.nix
];
@@ -141,21 +150,28 @@
check-case-conflicts.enable = true;
check-executables-have-shebangs.enable = true;
check-merge-conflicts.enable = true;
deadnix = {
enable = true;
settings = {
noLambdaArg = true;
};
};
detect-private-keys.enable = true;
end-of-file-fixer.enable = true;
fix-byte-order-marker.enable = true;
mixed-line-endings.enable = true;
nixfmt-rfc-style.enable = true;
treefmt.enable = true;
trim-trailing-whitespace.enable = true;
};
};
};
treefmt = {
projectRootFile = "flake.nix";
programs = {
deadnix = {
enable = true;
no-lambda-arg = true;
};
mdformat.enable = true;
nixfmt-rfc-style.enable = true;
shellcheck.enable = true;
};
};
};
};
}