-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
47 lines (41 loc) · 1.08 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
description = "NAHO's substantial university projects";
inputs = {
flakeUtils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
preCommitHooks = {
inputs = {
flake-utils.follows = "flakeUtils";
nixpkgs-stable.follows = "preCommitHooks/nixpkgs";
nixpkgs.follows = "nixpkgs";
};
url = "github:cachix/pre-commit-hooks.nix";
};
};
outputs = {
self,
flakeUtils,
nixpkgs,
preCommitHooks,
...
}:
flakeUtils.lib.eachDefaultSystem (
system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
checks.preCommitHooks = preCommitHooks.lib.${system}.run {
hooks = {
alejandra.enable = true;
convco.enable = true;
typos.enable = true;
yamllint.enable = true;
};
settings.alejandra.verbosity = "quiet";
src = ./.;
};
devShells.default = pkgs.mkShell {
inherit (self.checks.${system}.preCommitHooks) shellHook;
};
}
);
}