File tree 3 files changed +97
-0
lines changed
3 files changed +97
-0
lines changed Original file line number Diff line number Diff line change
1
+ /.pre-commit-config.yaml
1
2
/flake.lock
2
3
/result *
3
4
/template /flake.lock
Original file line number Diff line number Diff line change 18
18
inputs . nixpkgs . follows = "nixpkgs" ;
19
19
} ;
20
20
21
+ pre-commit-hooks = {
22
+ inputs . nixpkgs . follows = "nixpkgs" ;
23
+ url = "github:cachix/pre-commit-hooks.nix" ;
24
+ } ;
25
+
21
26
sops-nix = {
22
27
url = "github:Mic92/sops-nix" ;
23
28
inputs = {
30
35
outputs =
31
36
{
32
37
flake-utils-plus ,
38
+ pre-commit-hooks ,
33
39
nixpkgs ,
34
40
self ,
35
41
...
59
65
system :
60
66
let
61
67
pkgs = nixpkgs . legacyPackages . ${ system } ;
68
+ pre-commit-check = pre-commit-hooks . lib . ${ pkgs . hostPlatform . system } . run {
69
+ src = ./. ;
70
+ hooks = {
71
+ # TODO: Fix all errors and enable statix
72
+ # statix.enable = true;
73
+ nixfmt-rfc-style . enable = true ;
74
+ } ;
75
+ } ;
62
76
in
63
77
{
78
+ checks = {
79
+ inherit pre-commit-check ;
80
+ } ;
81
+
64
82
devShell = pkgs . mkShell {
83
+ inherit ( pre-commit-check ) shellHook ;
65
84
buildInputs = with pkgs ; [
66
85
git
67
86
nixfmt-rfc-style
You can’t perform that action at this time.
0 commit comments