{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
git-hooks = {
url = "github:cachix/git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Own flakes
tamma.url = "git+https://git.src.quest/~liljamo/tamma?ref=refs/tags/0.1.2";
};
outputs = inputs @ {self, ...}:
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["x86_64-linux"];
perSystem = {
pkgs,
system,
...
}: {
checks.pre-commit-check = inputs.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;
[
alejandra
nix-diff
sops
]
++ [
inputs.tamma.packages.${system}.default
]
++ self.checks.${system}.pre-commit-check.enabledPackages;
};
};
};
}