2024-07-12 20:07:40 +03:00
|
|
|
{
|
|
|
|
nixConfig.allow-import-from-derivation = true;
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
|
|
parts.url = "github:hercules-ci/flake-parts";
|
|
|
|
haskell-flake.url = "github:srid/haskell-flake";
|
|
|
|
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
|
|
|
|
};
|
|
|
|
outputs = inputs:
|
|
|
|
inputs.parts.lib.mkFlake {inherit inputs;} {
|
|
|
|
systems = ["x86_64-linux"];
|
|
|
|
imports = [
|
|
|
|
inputs.haskell-flake.flakeModule
|
|
|
|
inputs.pre-commit-hooks.flakeModule
|
|
|
|
];
|
|
|
|
|
|
|
|
perSystem = {config, ...}: {
|
|
|
|
pre-commit = {
|
|
|
|
check.enable = true;
|
|
|
|
settings.hooks = {
|
|
|
|
cabal-fmt.enable = true;
|
|
|
|
fourmolu.enable = true;
|
|
|
|
hlint.enable = true;
|
|
|
|
|
|
|
|
alejandra.enable = true;
|
|
|
|
statix.enable = true;
|
|
|
|
deadnix.enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
haskellProjects.default = {
|
2024-07-12 21:25:04 +03:00
|
|
|
settings.http-barf.haddock = true;
|
2024-07-12 20:07:40 +03:00
|
|
|
devShell.mkShellArgs.shellHook = config.pre-commit.installationScript;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|