From 87e220c708bf0badc8ef663b236a2139d6a19bad Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 29 May 2023 11:51:09 -0400 Subject: chore: move back to hercules-ci --- .hydra.json | 14 -------------- README.md | 2 +- flake.nix | 16 +++++++++++----- lib/ci.nix | 4 ++-- 4 files changed, 14 insertions(+), 22 deletions(-) delete mode 100644 .hydra.json diff --git a/.hydra.json b/.hydra.json deleted file mode 100644 index 201bd13..0000000 --- a/.hydra.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "main": { - "enabled": 1, - "type": 1, - "hidden": false, - "description": "build flake", - "checkinterval": 600, - "schedulingshares": 100, - "enableemail": false, - "emailoverride": "", - "keepnr": 2, - "flake": "github:getchoo/nix-exprs/main" - } -} diff --git a/README.md b/README.md index 802579f..b919072 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # nix-exprs -[![hydra build status](https://img.shields.io/endpoint?url=https://hydra.mydadleft.me/job/nix-exprs/main/packages.x86_64-linux.treefetch/shield&color=8f97cb&style=flat-square&logo=github)](https://hydra.mydadleft.me/jobset/nix-exprs/main#tabs-jobs) +[![hercules-ci build status](https://img.shields.io/badge/dynamic/json?label=hercules-ci%20builds&query=%24.state&url=https%3A%2F%2Fapi.github.com%2Frepos%2Fgetchoo%2Fnix-exprs%2Fcommits%2Fmain%2Fstatus&color=8f97cb&style=flat-square&logo=github)](https://hercules-ci.com/github/getchoo/nix-exprs) ## how to use diff --git a/flake.nix b/flake.nix index f403789..a285775 100644 --- a/flake.nix +++ b/flake.nix @@ -53,17 +53,23 @@ formatter = forEachSystem (pkgs: pkgs.alejandra); - hydraJobs = let - supportedSystems = [ + herculesCI = let + ciSystems = [ "x86_64-linux" "aarch64-linux" ]; lib = self.lib {inherit (self) inputs;}; - in - with lib.ci supportedSystems; { - packages = mkCompatiblePkgs self.packages; + inherit (lib.ci ciSystems) mkCompatiblePkgs; + in { + inherit ciSystems; + + onPush.default = { + outputs = { + packages = mkCompatiblePkgs self.packages; + }; }; + }; packages = forEachSystem ( pkgs: let diff --git a/lib/ci.nix b/lib/ci.nix index e4be846..9504f56 100644 --- a/lib/ci.nix +++ b/lib/ci.nix @@ -43,7 +43,7 @@ in rec { # mkComaptible, but maps nixosConfigurations # to their toplevel build attribute so they can - # be picked up by hydra + # be picked up by ci mkCompatibleCfg = configs: filterAttrs (_: config: check config.system) (mapAttrs (_: v: v.config.system.build.toplevel) configs); @@ -60,7 +60,7 @@ in rec { # mkCompatible, but maps homeConfigurations # to their activationPackage so they can be - # picked up by hydra + # picked up by ci mkCompatibleHM = configs: mkCompatible (mapAttrs (_: -- cgit v1.2.3