hydra: use the hydra flake

This commit is contained in:
Astro 2022-05-12 02:58:47 +02:00
parent 39df6cd23c
commit 2d8e802feb
4 changed files with 143 additions and 19 deletions

View File

@ -48,6 +48,44 @@
"url": "https://gitea.c3d2.de/astro/heliwatch.git"
}
},
"hydra": {
"inputs": {
"newNixpkgs": "newNixpkgs",
"nix": "nix",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1651520112,
"narHash": "sha256-LqBLIXYssvDoSp2Hf2+vDDB9O8VSF48HAGwL8pI2WZY=",
"owner": "nixos",
"repo": "hydra",
"rev": "7c133a98f8e689cdc13f8a1adaaa9cd75d039a35",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "hydra",
"type": "github"
}
},
"lowdown-src": {
"flake": false,
"locked": {
"lastModified": 1633514407,
"narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=",
"owner": "kristapsdz",
"repo": "lowdown",
"rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8",
"type": "github"
},
"original": {
"owner": "kristapsdz",
"repo": "lowdown",
"type": "github"
}
},
"naersk": {
"inputs": {
"nixpkgs": [
@ -68,6 +106,41 @@
"type": "github"
}
},
"newNixpkgs": {
"locked": {
"lastModified": 1647380550,
"narHash": "sha256-909TI9poX7CIUiFx203WL29YON6m/I6k0ExbZvR7bLM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6e3ee8957637a60f5072e33d78e05c0f65c54366",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable-small",
"repo": "nixpkgs",
"type": "github"
}
},
"nix": {
"inputs": {
"lowdown-src": "lowdown-src",
"nixpkgs": "nixpkgs",
"nixpkgs-regression": "nixpkgs-regression"
},
"locked": {
"lastModified": 1652280837,
"narHash": "sha256-N4To3tjnks/20pze4r1Wiu7s9+o21RxzKRfVX6+CDNo=",
"owner": "nixos",
"repo": "nix",
"rev": "b944b588fa280b0555b8269c0f6d097352f8716f",
"type": "github"
},
"original": {
"id": "nix",
"type": "indirect"
}
},
"nixos-hardware": {
"locked": {
"lastModified": 1650522846,
@ -85,18 +158,17 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1651368560,
"narHash": "sha256-OV6o5j27tnwqGhQd1u8/p5TjQI7+HyOnl6erteId4IE=",
"owner": "nixos",
"lastModified": 1645296114,
"narHash": "sha256-y53N7TyIkXsjMpOG7RhvqJFGDacLs9HlyHeSTBioqYU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e41bd3eeadc4cab64f5de69f0c099058fa7d4127",
"rev": "530a53dcbc9437363471167a5e4762c5fcfa34a1",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "release-21.11",
"repo": "nixpkgs",
"type": "github"
"id": "nixpkgs",
"ref": "nixos-21.05-small",
"type": "indirect"
}
},
"nixpkgs-master": {
@ -146,7 +218,38 @@
"type": "github"
}
},
"nixpkgs-regression": {
"locked": {
"lastModified": 1643052045,
"narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"type": "github"
},
"original": {
"id": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1651368560,
"narHash": "sha256-OV6o5j27tnwqGhQd1u8/p5TjQI7+HyOnl6erteId4IE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e41bd3eeadc4cab64f5de69f0c099058fa7d4127",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "release-21.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1651024496,
"narHash": "sha256-uKSrrw/neSkxX6TXPSaMyfu7iKzFrK7F6HOt6vQefGY=",
@ -179,7 +282,7 @@
},
"openwrt-imagebuilder": {
"inputs": {
"nixpkgs": "nixpkgs_2",
"nixpkgs": "nixpkgs_3",
"openwrt": "openwrt_2"
},
"locked": {
@ -216,9 +319,10 @@
"inputs": {
"fenix": "fenix",
"heliwatch": "heliwatch",
"hydra": "hydra",
"naersk": "naersk",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs_2",
"nixpkgs-master": "nixpkgs-master",
"nixpkgs-mobilizon": "nixpkgs-mobilizon",
"nixpkgs-openwebrx": "nixpkgs-openwebrx",

View File

@ -51,6 +51,11 @@
naersk.inputs.nixpkgs.follows = "nixpkgs";
fenix.url = "github:nix-community/fenix";
fenix.inputs.nixpkgs.follows = "nixpkgs";
hydra = {
url = "github:nixos/hydra";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nix.url = "github:nixos/nix";
};
};
outputs = inputs@{ self, nixpkgs, secrets, nixos-hardware, zentralwerk, yammat, scrapers, spacemsg, tigger, ticker, heliwatch, sops-nix, naersk, fenix, ... }:
@ -391,6 +396,7 @@
hydra = nixosSystem' {
modules = [
inputs.hydra.nixosModules.hydra
./hosts/hydra
{
sops.defaultSopsFile = "${secrets}/hosts/hydra/secrets.yaml";

View File

@ -23,4 +23,11 @@
'';
};
# workaround so that nix-serve builds with nix overriden by
# hydra.nixosModule
nixpkgs.config.packageOverrides = pkgs: {
nix-serve = pkgs.nix-serve.override {
nix = config.nix.package;
};
};
}

View File

@ -23,20 +23,27 @@ in {
daemonIOSchedPriority = 7;
};
services.hydra = {
services.hydra-dev = {
enable = true;
hydraURL = "https://hydra.hq.c3d2.de";
logo = ./c3d2.svg;
notificationSender = "hydra@spam.works";
package = pkgs.hydra-unstable.overrideAttrs (oa: {
# HACK for Hydra error: cannot write modified lock file of flake
patchPhase = ''
${pkgs.lib.optionalString (oa ? patchPhase) oa.patchPhase}
# package = pkgs.hydra-unstable.overrideAttrs (oa: {
# src = pkgs.fetchFromGitHub {
# owner = "nixos";
# repo = "hydra";
# # master as of 2022-05-02
# rev = "7c133a98f8e689cdc13f8a1adaaa9cd75d039a35";
# sha256 = "01mgg9ngpjinlwbgm2s287namilm3ddlwpn0hjs6267608vjgi02";
# };
# # HACK for Hydra error: cannot write modified lock file of flake
# patchPhase = ''
# ${pkgs.lib.optionalString (oa ? patchPhase) oa.patchPhase}
substituteInPlace src/script/hydra-eval-jobset \
--replace '"nix", "flake", "info"' '"nix", "flake", "info", "--no-write-lock-file"'
'';
});
# substituteInPlace src/script/hydra-eval-jobset \
# --replace '"nix", "flake", "info"' '"nix", "flake", "info", "--no-write-lock-file"'
# '';
# });
useSubstitutes = true;
extraConfig = ''
max_output_size = 4294967296