summaryrefslogtreecommitdiff
path: root/modules/flake/ci.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/flake/ci.nix')
-rw-r--r--modules/flake/ci.nix67
1 files changed, 17 insertions, 50 deletions
diff --git a/modules/flake/ci.nix b/modules/flake/ci.nix
index 91dc397..9f4e58d 100644
--- a/modules/flake/ci.nix
+++ b/modules/flake/ci.nix
@@ -1,56 +1,23 @@
{
+ myLib,
self,
- inputs,
...
-}: let
- inherit (inputs) hercules-ci-effects nixpkgs;
-in {
- imports = [
- hercules-ci-effects.flakeModule
- ];
-
- hercules-ci = {
- flake-update = {
- enable = true;
- when = {
- hour = [0];
- minute = 0;
+}: {
+ flake = {
+ hydraJobs = let
+ supportedSystems = [
+ "x86_64-linux"
+ "aarch64-linux"
+ ];
+ in
+ with (myLib.my.ci supportedSystems); {
+ apps = mkCompatibleApps self.apps;
+ checks = mkCompatible self.checks;
+ devShells = mkCompatible self.devShells;
+ formatter = mkCompatibleFormatters self.formatter;
+ homeConfigurations = mkCompatibleHM self.homeConfigurations;
+ packages = mkCompatiblePkgs self.packages;
+ hosts = mkCompatibleCfg self.nixosConfigurations;
};
- };
- };
-
- herculesCI = let
- inherit
- (import
- (hercules-ci-effects + "/vendor/hercules-ci-agent/default-herculesCI-for-flake.nix"))
- flakeToOutputs
- ;
- in rec {
- ciSystems = [
- "x86_64-linux"
- "aarch64-linux"
- ];
-
- onPush = {
- default = {
- outputs = with builtins;
- with nixpkgs.lib; let
- # use defaults, but only evaluate hosts
- defaults =
- removeAttrs
- (flakeToOutputs self {
- ciSystems = genAttrs ciSystems (_: {});
- })
- ["nixosConfigurations" "packages"];
-
- evaluate = mapAttrs (_: v:
- seq
- v.config.system.build.toplevel
- v._module.args.pkgs.emptyFile)
- self.nixosConfigurations;
- in
- mkForce (defaults // evaluate);
- };
- };
};
}