chore(nix): switch to alejandra

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu 2023-05-14 11:38:48 +02:00
parent 7726ed9370
commit 25f53d8ab5
No known key found for this signature in database
GPG key ID: E13DFD4B47127951

View file

@ -11,22 +11,28 @@
}; };
}; };
outputs = { self, nixpkgs, flake-utils, pre-commit-hooks, ... }: outputs = {
flake-utils.lib.eachDefaultSystem (system: self,
let pkgs = nixpkgs.legacyPackages.${system}; nixpkgs,
in { flake-utils,
checks = { pre-commit-hooks,
pre-commit-check = pre-commit-hooks.lib.${system}.run { ...
src = ./.; }:
hooks = { flake-utils.lib.eachDefaultSystem (system: let
nixfmt.enable = true; pkgs = nixpkgs.legacyPackages.${system};
prettier.enable = true; in {
}; checks = {
pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
alejandra.enable = true;
prettier.enable = true;
}; };
}; };
devShells.default = pkgs.mkShell { };
inherit (self.checks.${system}.pre-commit-check) shellHook; devShells.default = pkgs.mkShell {
packages = with pkgs; [ yarn ]; inherit (self.checks.${system}.pre-commit-check) shellHook;
}; packages = with pkgs; [yarn];
}); };
});
} }