{ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; flake-parts.url = "github:hercules-ci/flake-parts"; git-hooks.url = "github:cachix/git-hooks.nix"; }; outputs = inputs @ { self, nixpkgs, flake-parts, git-hooks, }: flake-parts.lib.mkFlake { inherit inputs; } { systems = ["x86_64-linux"]; perSystem = { pkgs, system, ... }: { checks.pre-commit-check = git-hooks.lib.${system}.run { src = ./.; hooks = { alejandra = { enable = true; }; }; }; devShells.default = pkgs.mkShell { inherit (self.checks.${system}.pre-commit-check) shellHook; buildInputs = with pkgs; [ nix-diff sops ] ++ self.checks.${system}.pre-commit-check.enabledPackages; }; }; }; }