2023-01-15 23:30:25 +00:00
|
|
|
{
|
|
|
|
description = "maralorns configuration";
|
2023-01-19 03:13:41 +00:00
|
|
|
nixConfig = {
|
|
|
|
allow-import-from-derivation = true;
|
|
|
|
};
|
2023-01-15 23:30:25 +00:00
|
|
|
|
|
|
|
inputs = {
|
2023-01-19 03:13:41 +00:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
2023-01-15 23:30:25 +00:00
|
|
|
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
|
|
|
|
pre-commit-hooks-nix = {
|
|
|
|
url = "github:cachix/pre-commit-hooks.nix";
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = inputs @ {
|
|
|
|
nixpkgs,
|
|
|
|
flake-parts,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
flake-parts.lib.mkFlake {inherit inputs;} {
|
|
|
|
imports = [
|
|
|
|
inputs.pre-commit-hooks-nix.flakeModule
|
|
|
|
];
|
|
|
|
systems = ["x86_64-linux"];
|
|
|
|
perSystem = {
|
|
|
|
self',
|
|
|
|
pkgs,
|
|
|
|
config,
|
2023-01-19 03:13:41 +00:00
|
|
|
lib,
|
2023-01-15 23:30:25 +00:00
|
|
|
...
|
2023-01-19 03:13:41 +00:00
|
|
|
}: let
|
|
|
|
packages = import ./packages {inherit pkgs;};
|
|
|
|
in {
|
|
|
|
devShells.default = packages.shell {
|
2023-01-15 23:30:25 +00:00
|
|
|
shellHook = config.pre-commit.installationScript;
|
|
|
|
};
|
2023-01-19 03:13:41 +00:00
|
|
|
inherit (packages) packages;
|
|
|
|
legacyPackages = {inherit (packages) haskellPackagesOverlay;};
|
|
|
|
|
2023-01-15 23:30:25 +00:00
|
|
|
pre-commit = {
|
|
|
|
check.enable = true;
|
2023-01-16 02:57:11 +00:00
|
|
|
settings = {
|
|
|
|
settings.ormolu.defaultExtensions = [
|
|
|
|
"TypeApplications"
|
|
|
|
"BangPatterns"
|
|
|
|
"ImportQualifiedPost"
|
|
|
|
"BlockArguments"
|
|
|
|
];
|
|
|
|
hooks = {
|
|
|
|
hlint.enable = true;
|
|
|
|
alejandra.enable = true;
|
|
|
|
nix-linter.enable = false; # Too many false positives for now
|
|
|
|
statix.enable = true;
|
|
|
|
fourmolu.enable = true;
|
|
|
|
shellcheck.enable = true;
|
2023-01-16 03:26:37 +00:00
|
|
|
cabal-fmt.enable = true;
|
|
|
|
dhall-format.enable = true;
|
2023-01-16 02:57:11 +00:00
|
|
|
};
|
2023-01-15 23:30:25 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|