From fe576c9a966b3259af3add5517f9df9e18b56408 Mon Sep 17 00:00:00 2001
From: zowoq <59103226+zowoq@users.noreply.github.com>
Date: Wed, 2 Nov 2022 08:00:31 +1000
Subject: [PATCH] switch to nixpkgs hydra

---
 build03/configuration.nix  | 1 +
 flake.nix                  | 9 ---------
 services/hydra/default.nix | 7 +------
 3 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/build03/configuration.nix b/build03/configuration.nix
index f2dc808..91f8cd3 100644
--- a/build03/configuration.nix
+++ b/build03/configuration.nix
@@ -19,6 +19,7 @@
     ../roles/remote-builder/aarch64-build04.nix
 
     ../services/hound
+    ../services/hydra
     ../services/matterbridge.nix
   ];
 
diff --git a/flake.nix b/flake.nix
index faa84e6..124fdbc 100644
--- a/flake.nix
+++ b/flake.nix
@@ -12,7 +12,6 @@
 
   inputs = {
     nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
-    nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-22.05-small";
     nixpkgs-update.url = "github:ryantm/nixpkgs-update";
     nixpkgs-update-github-releases.url = "github:ryantm/nixpkgs-update-github-releases";
     nixpkgs-update-github-releases.flake = false;
@@ -21,10 +20,6 @@
     sops-nix.url = "github:Mic92/sops-nix";
     sops-nix.inputs.nixpkgs.follows = "nixpkgs";
     hercules-ci-agent.url = "github:hercules-ci/hercules-ci-agent/master";
-    hydra.url = "github:NixOS/hydra";
-    # switch back to unstable when NixOS/nix moves to 22.11
-    #hydra.inputs.nixpkgs.follows = "nixpkgs";
-    hydra.inputs.nixpkgs.follows = "nixpkgs-stable";
 
     flake-parts.url = "github:hercules-ci/flake-parts";
     flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
@@ -93,10 +88,6 @@
             modules =
               common
               ++ [
-                (import ./services/hydra {
-                  inherit (self.inputs) hydra;
-                })
-
                 ./build03/configuration.nix
               ];
           };
diff --git a/services/hydra/default.nix b/services/hydra/default.nix
index 771e5d5..3103ded 100644
--- a/services/hydra/default.nix
+++ b/services/hydra/default.nix
@@ -1,4 +1,4 @@
-{ hydra }: { lib, pkgs, config, ... }:
+{ lib, pkgs, config, ... }:
 with lib; let
   cfg = config;
 
@@ -60,11 +60,6 @@ in {
         ];
     };
 
-    services.hydra.package = hydra.packages.${pkgs.system}.default.overrideAttrs (old: {
-      # FIXME: somehow tests are only broken when we build on our builder...
-      doCheck = false;
-    });
-
     sops.secrets.nix-community-cachix.sopsFile = ../../roles/nix-community-cache.yaml;
     sops.secrets.id_buildfarm = {};