hooks: declare nixpkgs-fmt pre-commit hook
This commit is contained in:
parent
28e473517d
commit
a0b9f9ffe6
4 changed files with 16 additions and 2 deletions
5
.pre-commit-config.yaml
Normal file
5
.pre-commit-config.yaml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/nix-community/nixpkgs-fmt
|
||||||
|
rev: master
|
||||||
|
hooks:
|
||||||
|
- id: nixpkgs-fmt
|
|
@ -6,7 +6,9 @@ the `template` branch to provide a host of useful NixOS configurations available
|
||||||
"out of the box". If you wish to contribute such an expression please follow
|
"out of the box". If you wish to contribute such an expression please follow
|
||||||
these guidelines:
|
these guidelines:
|
||||||
|
|
||||||
* format your code with [`nixpkgs-fmt`][nixpkgs-fmt]
|
* format your code with [`nixpkgs-fmt`][nixpkgs-fmt]. You can run the `hooks`
|
||||||
|
command inside the nix shell to install a pre-commit hook that does this
|
||||||
|
for you.
|
||||||
* The commit message follows the same semantics as [nixpkgs][nixpkgs].
|
* The commit message follows the same semantics as [nixpkgs][nixpkgs].
|
||||||
* You can use a `#` symbol to specify ambiguities. For example,
|
* You can use a `#` symbol to specify ambiguities. For example,
|
||||||
`develop#zsh: <rest of commit message>` would tell me that your updating the
|
`develop#zsh: <rest of commit message>` would tell me that your updating the
|
||||||
|
|
|
@ -6,7 +6,8 @@ let
|
||||||
inherit sha256;
|
inherit sha256;
|
||||||
url = "${nugetUrlBase}/${name}/${version}";
|
url = "${nugetUrlBase}/${name}/${version}";
|
||||||
};
|
};
|
||||||
in [
|
in
|
||||||
|
[
|
||||||
|
|
||||||
(fetchNuGet {
|
(fetchNuGet {
|
||||||
name = "Microsoft.AspNetCore.App.Runtime.linux-x64";
|
name = "Microsoft.AspNetCore.App.Runtime.linux-x64";
|
||||||
|
|
|
@ -37,6 +37,7 @@ pkgs.mkDevShell {
|
||||||
nixos-install
|
nixos-install
|
||||||
nixos-generate-config
|
nixos-generate-config
|
||||||
nixos-enter
|
nixos-enter
|
||||||
|
pre-commit
|
||||||
];
|
];
|
||||||
|
|
||||||
env = { inherit name; };
|
env = { inherit name; };
|
||||||
|
@ -54,6 +55,11 @@ pkgs.mkDevShell {
|
||||||
category = "main";
|
category = "main";
|
||||||
package = flk;
|
package = flk;
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
name = "hooks";
|
||||||
|
help = "install git hooks";
|
||||||
|
command = "pre-commit install";
|
||||||
|
}
|
||||||
{
|
{
|
||||||
name = "grip";
|
name = "grip";
|
||||||
help = python38Packages.grip.meta.description;
|
help = python38Packages.grip.meta.description;
|
||||||
|
|
Loading…
Reference in a new issue