From 27598259168d21ffae823cb2c05a2485e2309abf Mon Sep 17 00:00:00 2001
From: zowoq <59103226+zowoq@users.noreply.github.com>
Date: Sat, 6 Jul 2024 16:58:34 +1000
Subject: [PATCH] hydra: switch to fork

---
 flake.lock | 18 ++++++++++++++++++
 flake.nix  | 11 +++++++++++
 2 files changed, 29 insertions(+)

diff --git a/flake.lock b/flake.lock
index dddd34c..9e75764 100644
--- a/flake.lock
+++ b/flake.lock
@@ -147,6 +147,23 @@
         "type": "github"
       }
     },
+    "hydra": {
+      "flake": false,
+      "locked": {
+        "lastModified": 1726454607,
+        "narHash": "sha256-wgrT9T6f1VRwTGSKX6SzWIQ/86hViotAhxfSEYVvp6A=",
+        "owner": "qowoz",
+        "repo": "hydra",
+        "rev": "e8f81311f67ee5e86a3c10453b8609695f66e9d7",
+        "type": "github"
+      },
+      "original": {
+        "owner": "qowoz",
+        "ref": "community",
+        "repo": "hydra",
+        "type": "github"
+      }
+    },
     "lite-config": {
       "locked": {
         "lastModified": 1723691425,
@@ -304,6 +321,7 @@
         "empty": "empty",
         "flake-compat": "flake-compat",
         "flake-parts": "flake-parts",
+        "hydra": "hydra",
         "lite-config": "lite-config",
         "nix-darwin": "nix-darwin",
         "nix-index-database": "nix-index-database",
diff --git a/flake.nix b/flake.nix
index f882c85..c302098 100644
--- a/flake.nix
+++ b/flake.nix
@@ -24,6 +24,8 @@
     flake-compat.url = "github:nix-community/flake-compat";
     flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
     flake-parts.url = "github:hercules-ci/flake-parts";
+    hydra.flake = false;
+    hydra.url = "github:qowoz/hydra/community";
     lite-config.url = "github:yelite/lite-config";
     nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
     nix-darwin.url = "github:LnL7/nix-darwin";
@@ -63,6 +65,15 @@
         {
           nixpkgs = {
             config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "terraform" ];
+            overlays = [
+              (final: prev: {
+                hydra = (prev.hydra.override { nix = final.nixVersions.nix_2_22; }).overrideAttrs (o: {
+                  version = inputs.hydra.shortRev;
+                  src = inputs.hydra;
+                  buildInputs = o.buildInputs ++ [ final.perlPackages.DBIxClassHelpers ];
+                });
+              })
+            ];
           };
 
           hostModuleDir = ./hosts;