mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-06-08 10:09:04 +02:00
feat: add pre-commit-hooks
This commit is contained in:
parent
b7f553f3ec
commit
ec1fa9b3b8
3 changed files with 56 additions and 5 deletions
31
shell.nix
31
shell.nix
|
@ -1,12 +1,35 @@
|
|||
let
|
||||
inputs = import ./deps;
|
||||
pkgs = import inputs.nixpkgs { };
|
||||
pkgs = import inputs.unstable { };
|
||||
nixos-anywhere = pkgs.callPackage "${inputs.nixos-anywhere}/src/default.nix" { };
|
||||
agenix = pkgs.callPackage "${inputs.agenix}/pkgs/agenix.nix" { };
|
||||
bootstrap = import scripts/bootstrap-machine.nix;
|
||||
pre-commit-hook = (import inputs.git-hooks).run {
|
||||
src = ./.;
|
||||
|
||||
hooks = {
|
||||
statix.enable = true;
|
||||
deadnix.enable = true;
|
||||
rfc101 = {
|
||||
enable = true;
|
||||
name = "RFC-101 formatting";
|
||||
entry = "${pkgs.lib.getExe pkgs.nixfmt-rfc-style}";
|
||||
files = "\\.nix$";
|
||||
};
|
||||
commitizen.enable = true;
|
||||
};
|
||||
};
|
||||
in
|
||||
pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [ colmena npins nixos-anywhere agenix bootstrap ];
|
||||
nativeBuildInputs = with pkgs; [
|
||||
colmena
|
||||
npins
|
||||
nixos-anywhere
|
||||
agenix
|
||||
bootstrap
|
||||
statix
|
||||
];
|
||||
shellHook = ''
|
||||
${pre-commit-hook.shellHook}
|
||||
'';
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue