2022-05-28 13:18:06 +02:00
|
|
|
{ config, lib, inputs, withSystem, ... }:
|
2022-05-13 10:10:42 +02:00
|
|
|
|
|
|
|
{
|
|
|
|
imports = [
|
2022-05-17 10:18:59 +02:00
|
|
|
inputs.pre-commit-hooks-nix.flakeModule
|
2022-11-12 16:30:20 +01:00
|
|
|
inputs.hercules-ci-effects.flakeModule # herculesCI attr
|
2022-05-13 10:10:42 +02:00
|
|
|
];
|
|
|
|
systems = [ "x86_64-linux" "aarch64-darwin" ];
|
2022-05-25 18:09:17 +02:00
|
|
|
perSystem = { config, self', inputs', pkgs, ... }: {
|
2022-05-17 10:18:59 +02:00
|
|
|
|
2022-05-13 10:10:42 +02:00
|
|
|
devShells.default = pkgs.mkShell {
|
2022-05-17 10:18:59 +02:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkgs.nixpkgs-fmt
|
|
|
|
pkgs.pre-commit
|
2022-11-13 12:25:22 +01:00
|
|
|
pkgs.hci
|
2022-05-17 10:18:59 +02:00
|
|
|
];
|
|
|
|
shellHook = ''
|
|
|
|
${config.pre-commit.installationScript}
|
|
|
|
'';
|
2022-05-13 10:10:42 +02:00
|
|
|
};
|
2022-05-18 11:03:42 +02:00
|
|
|
|
2022-05-17 10:18:59 +02:00
|
|
|
pre-commit = {
|
|
|
|
inherit pkgs; # should make this default to the one it can get via follows
|
|
|
|
settings = {
|
2022-05-17 10:28:03 +02:00
|
|
|
hooks.nixpkgs-fmt.enable = true;
|
2022-05-17 10:18:59 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-05-13 10:10:42 +02:00
|
|
|
};
|
2022-11-11 08:00:22 +01:00
|
|
|
flake = {
|
2022-05-13 10:10:42 +02:00
|
|
|
# for repl exploration / debug
|
|
|
|
config.config = config;
|
|
|
|
options.mySystem = lib.mkOption { default = config.allSystems.${builtins.currentSystem}; };
|
2022-11-13 12:19:55 +01:00
|
|
|
config.effects = withSystem "x86_64-linux" ({ config, pkgs, hci-effects, ... }: {
|
|
|
|
tests = {
|
|
|
|
template = pkgs.callPackage ./tests/template.nix { inherit hci-effects; };
|
|
|
|
};
|
|
|
|
});
|
2022-05-13 10:10:42 +02:00
|
|
|
};
|
|
|
|
}
|