From 5df48c425569a638a7471af3ad61fb62e4c18c60 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Mon, 7 Apr 2025 10:33:01 -0500 Subject: [PATCH] flake.nix: add formatter check --- .github/workflows/test.yml | 4 +++- flake.nix | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6a698c329..84bf37a6d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,13 +15,15 @@ jobs: - uses: cachix/install-nix-action@v31 with: nix_path: nixpkgs=channel:nixos-unstable + extra_nix_config: | + experimental-features = nix-command flakes - run: | if grep -R --exclude stdlib-extended.nix literalExample modules ; then echo "Error: literalExample should be replaced by literalExpression" > /dev/stderr exit 1 fi - run: nix-build --show-trace -A docs.jsonModuleMaintainers - - run: ./format -c + - run: nix flake check - run: nix-shell --show-trace . -A install - run: yes | home-manager -I home-manager=. uninstall - run: nix-shell -j auto --show-trace --arg enableBig false --pure tests -A run.all diff --git a/flake.nix b/flake.nix index 29175de5e..493bbe265 100644 --- a/flake.nix +++ b/flake.nix @@ -56,6 +56,10 @@ }; }); in { + checks = forAllSystems (system: { + formatting = treefmtEval.${system}.config.build.check self; + }); + formatter = forAllSystems (system: treefmtEval.${system}.config.build.wrapper); packages = forAllSystems (system: