desktop is building I guess, idk, need to start commiting stuff eventually lmao
This commit is contained in:
49
templates/checks/pre-commit-hooks/default.nix
Normal file
49
templates/checks/pre-commit-hooks/default.nix
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
namespace,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (inputs) pre-commit-hooks-nix;
|
||||
in
|
||||
pre-commit-hooks-nix.lib.${pkgs.system}.run {
|
||||
src = ./.;
|
||||
hooks =
|
||||
let
|
||||
excludes = [
|
||||
"flake.lock"
|
||||
"*.md"
|
||||
];
|
||||
fail_fast = true;
|
||||
verbose = true;
|
||||
in
|
||||
{
|
||||
deadnix = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
edit = true;
|
||||
};
|
||||
};
|
||||
|
||||
nixfmt = {
|
||||
enable = true;
|
||||
package = pkgs.nixfmt-rfc-style;
|
||||
};
|
||||
|
||||
pre-commit-hook-ensure-sops.enable = true;
|
||||
|
||||
prettier = {
|
||||
enable = true;
|
||||
inherit excludes fail_fast verbose;
|
||||
|
||||
description = "pre-commit hook for prettier";
|
||||
settings = {
|
||||
binPath = "${lib.getExe pkgs.prettierd}";
|
||||
write = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user