mirror of
https://git.sr.ht/~bryan_bennett/flake_env
synced 2025-12-17 07:01:23 +01:00
Update flake and conventions for 24.05+
This commit is contained in:
parent
33d91a5af4
commit
bc779a2764
5 changed files with 48 additions and 84 deletions
20
flake.nix
20
flake.nix
|
|
@ -6,14 +6,17 @@
|
|||
url = "github:hercules-ci/flake-parts";
|
||||
inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||
};
|
||||
pre-commit-hooks = { url = "github:cachix/pre-commit-hooks.nix"; };
|
||||
git-hooks = {
|
||||
url = "github:cachix/git-hooks.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nix-filter = { url = "github:numtide/nix-filter"; };
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs @ { flake-parts
|
||||
, nix-filter
|
||||
, pre-commit-hooks
|
||||
, git-hooks
|
||||
, ...
|
||||
}:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } ({ lib, ... }: {
|
||||
|
|
@ -24,7 +27,7 @@
|
|||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
imports = [ pre-commit-hooks.flakeModule ];
|
||||
imports = [ git-hooks.flakeModule ];
|
||||
perSystem =
|
||||
{ config
|
||||
, pkgs
|
||||
|
|
@ -60,7 +63,16 @@
|
|||
check.enable = true;
|
||||
settings.hooks = {
|
||||
nixpkgs-fmt.enable = true;
|
||||
dune-fmt.enable = true;
|
||||
|
||||
dune-fmt = {
|
||||
enable = true;
|
||||
settings = {
|
||||
extraRuntimeInputs = [
|
||||
pkgs.ocamlPackages.reason
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue