diff --git a/flake.nix b/flake.nix index aebd6d8..fb5faf0 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 3e9356d..7714909 100755 --- a/scripts/ci.sh +++ b/scripts/ci.sh @@ -4,4 +4,6 @@ set -eu nix develop --command stylua --check lua spec 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 busted