From 886ab4044801ac6d0713e950a05c134e25958626 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Fri, 10 May 2024 00:02:07 -0500 Subject: [PATCH] test(nix): add formatting check --- flake.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/flake.nix b/flake.nix index 43d5776d..83832f42 100644 --- a/flake.nix +++ b/flake.nix @@ -124,6 +124,22 @@ ''; }; }); + checks = forAllSystems (pkgs: { + formatting = + pkgs.runCommand "check-fmt" + { + buildInputs = with pkgs; [ + findutils + (import ./pkgs { inherit pkgs; }).Fmt + ]; + } + '' + set -euo pipefail + cd "${self}" + find . -type f | xargs Fmt + touch $out + ''; + }); apps = forAllSystems (pkgs: { home-manager-init = { type = "app";