test
This commit is contained in:
52
flake.nix
52
flake.nix
@@ -43,16 +43,20 @@
|
||||
url = "github:zhaofengli/colmena";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
git-hooks = {
|
||||
url = "github:cachix/git-hooks.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
nix-on-droid,
|
||||
nixgl,
|
||||
...
|
||||
{ self
|
||||
, nixpkgs
|
||||
, home-manager
|
||||
, nix-on-droid
|
||||
, nixgl
|
||||
, git-hooks
|
||||
, ...
|
||||
}@inputs:
|
||||
let
|
||||
inherit (self) outputs;
|
||||
@@ -73,7 +77,12 @@
|
||||
system = import ./hosts/${host}/system.nix;
|
||||
modules = [ ./hosts/${host} ];
|
||||
specialArgs = {
|
||||
inherit inputs outputs dotsPath;
|
||||
inherit
|
||||
inputs
|
||||
outputs
|
||||
dotsPath
|
||||
self
|
||||
;
|
||||
};
|
||||
}
|
||||
))
|
||||
@@ -128,6 +137,33 @@
|
||||
;
|
||||
};
|
||||
|
||||
checks.${system}.pre-commit-check = git-hooks.lib.${system}.run {
|
||||
src = ./.;
|
||||
hooks = {
|
||||
nixpkgs-fmt.enable = true;
|
||||
statix.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
apps.${system}.pre-commit-install =
|
||||
let
|
||||
hooks = git-hooks.lib.${system}.run {
|
||||
src = ./.;
|
||||
hooks = {
|
||||
nixpkgs-fmt.enable = true;
|
||||
statix.enable = true;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
type = "app";
|
||||
program = toString (
|
||||
pkgs.writeShellScript "install-hooks" ''
|
||||
${hooks.shellHook}
|
||||
''
|
||||
);
|
||||
};
|
||||
|
||||
images.sd-image-aarch64 = self.nixosConfigurations.sd-image-aarch64.config.system.build.sdImage;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user