This commit is contained in:
2026-02-05 16:04:00 +01:00
parent 53cf49f158
commit 4ac16cedc4
5 changed files with 151 additions and 22 deletions

View File

@@ -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;
};
}