From f18dfa0a8de96c25547061eb9f23a666ec11aaca Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Wed, 4 Mar 2026 14:11:41 -0500 Subject: [PATCH] ci: nix --- flake.nix | 5 ++++- scripts/ci.sh | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 2753286..e95338d 100644 --- a/flake.nix +++ b/flake.nix @@ -13,9 +13,12 @@ ... }: let - forEachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system}); + forEachSystem = + f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system}); in { + formatter = forEachSystem (pkgs: pkgs.nixfmt-tree); + devShells = forEachSystem (pkgs: { default = pkgs.mkShell { packages = [ diff --git a/scripts/ci.sh b/scripts/ci.sh index 7b5f52b..18dc321 100755 --- a/scripts/ci.sh +++ b/scripts/ci.sh @@ -4,4 +4,6 @@ set -eu nix develop --command stylua --check . git ls-files '*.lua' | xargs nix develop --command selene --display-style quiet nix develop --command prettier --check . +nix fmt +git diff --exit-code -- '*.nix' nix develop --command lua-language-server --check . --checklevel=Warning