style(treewide): Switch to nixfmt

This commit is contained in:
Tristan Daniël Maat 2025-11-20 15:46:17 +08:00
parent 4b0e6f0a8c
commit 82c1d22d3d
Signed by: tlater
GPG key ID: 02E935006CF2E8E7
8 changed files with 154 additions and 126 deletions

View file

@ -2,26 +2,31 @@
self,
lib,
stdenv,
alejandra,
nixfmt-rfc-style,
deadnix,
statix,
}: let
}:
let
inherit (lib) sourceFilesBySuffices;
in
stdenv.mkDerivation {
dontPatch = true;
dontConfigure = true;
dontBuild = true;
dontInstall = true;
doCheck = true;
stdenv.mkDerivation {
dontPatch = true;
dontConfigure = true;
dontBuild = true;
dontInstall = true;
doCheck = true;
name = "lint-nix";
src = sourceFilesBySuffices self [".nix"];
checkInputs = [alejandra deadnix statix];
checkPhase = ''
mkdir -p $out
alejandra --check . | tee $out/alejandra.log
deadnix --fail | tee $out/deadnix.log
statix check | tee $out/statix.log
'';
}
name = "lint-nix";
src = sourceFilesBySuffices self [ ".nix" ];
checkInputs = [
nixfmt-rfc-style
deadnix
statix
];
checkPhase = ''
mkdir -p $out
nixfmt --strict --check . | tee $out/nixfmt.log
deadnix --fail | tee $out/deadnix.log
statix check | tee $out/statix.log
'';
}