1
0
Fork 0
mirror of https://github.com/hercules-ci/flake-parts.git synced 2024-12-14 11:47:31 +00:00

dev: Add nixpkgs-fmt to pre-commit

This commit is contained in:
Robert Hensing 2022-05-17 10:28:03 +02:00
parent fcf9d5234b
commit 62e39568d5
5 changed files with 8 additions and 7 deletions

3
ci.nix
View file

@ -4,7 +4,8 @@
let
flake = import ./dev;
inherit (flake.inputs.nixpkgs) lib;
in {
in
{
inherit (flake) herculesCI;
} // {
checks = lib.recurseIntoAttrs flake.checks.${builtins.currentSystem};

View file

@ -9,4 +9,4 @@ let
{ inherit self; }
./flake-module.nix;
in
self.config.flake // { inherit (flake) inputs; }
self.config.flake // { inherit (flake) inputs; }

View file

@ -20,6 +20,7 @@ flakeModuleArgs@{ config, lib, inputs, ... }:
pre-commit = {
inherit pkgs; # should make this default to the one it can get via follows
settings = {
hooks.nixpkgs-fmt.enable = true;
};
};
@ -43,7 +44,7 @@ flakeModuleArgs@{ config, lib, inputs, ... }:
flake = {
options.herculesCI = lib.mkOption { type = lib.types.raw; };
config.herculesCI = {
onPush.default.outputs = {
onPush.default.outputs = {
inherit (config.flake) packages checks;
};
};

View file

@ -24,10 +24,10 @@ let
options:
mkOption {
type = types.submoduleWith {
modules = [ { inherit options; } ];
modules = [{ inherit options; }];
};
};
mkPerSystemType =
module:
types.functionTo (types.submoduleWith {

View file

@ -1,4 +1,3 @@
# Definitions can be imported from a separate file like this one
{ self, ... }: {
@ -15,4 +14,4 @@
];
};
};
}
}