Added git hooks
This commit is contained in:
parent
467f9a0b3e
commit
3a2af5fb69
3 changed files with 82 additions and 6 deletions
18
flake.nix
18
flake.nix
|
|
@ -5,6 +5,7 @@
|
|||
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
|
||||
systems = ["x86_64-linux"];
|
||||
imports = [
|
||||
inputs.git-hooks-nix.flakeModule
|
||||
./hosts
|
||||
];
|
||||
|
||||
|
|
@ -13,6 +14,13 @@
|
|||
pkgs,
|
||||
...
|
||||
}: {
|
||||
pre-commit.settings.hooks = {
|
||||
alejandra.enable = true;
|
||||
flake-checker.enable = true;
|
||||
nil.enable = true;
|
||||
};
|
||||
|
||||
formatter = pkgs.alejandra;
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = [
|
||||
pkgs.alejandra
|
||||
|
|
@ -20,9 +28,11 @@
|
|||
];
|
||||
name = "dots";
|
||||
DIRENV_LOG_FORMAT = "";
|
||||
};
|
||||
|
||||
formatter = pkgs.alejandra;
|
||||
shellHook = ''
|
||||
${config.pre-commit.installationScript}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -31,6 +41,10 @@
|
|||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; # build error unrelated to config.
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11-small"; # build error unrelated to config.
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
git-hooks-nix = {
|
||||
url = "github:cachix/git-hooks.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
hm = {
|
||||
url = "github:nix-community/home-manager/master";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue