switch to upstream hercules ci agent

This commit is contained in:
zowoq 2023-10-27 14:41:03 +10:00
parent 7588976445
commit a2f560d6f9
4 changed files with 67 additions and 6 deletions
flake.lockflake.nix
modules
darwin/hercules-ci
nixos/hercules-ci

65
flake.lock generated
View file

@ -40,6 +40,44 @@
"type": "github"
}
},
"haskell-flake": {
"locked": {
"lastModified": 1684780604,
"narHash": "sha256-2uMZsewmRn7rRtAnnQNw1lj0uZBMh4m6Cs/7dV5YF08=",
"owner": "srid",
"repo": "haskell-flake",
"rev": "74210fa80a49f1b6f67223debdbf1494596ff9f2",
"type": "github"
},
"original": {
"owner": "srid",
"ref": "0.3.0",
"repo": "haskell-flake",
"type": "github"
}
},
"hercules-ci-agent": {
"inputs": {
"flake-parts": [
"flake-parts"
],
"haskell-flake": "haskell-flake",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1698580029,
"narHash": "sha256-tIrIpD+su09pMg+0++6GxmWQtBr9N2JTUhAHRgW4Ezk=",
"owner": "hercules-ci",
"repo": "hercules-ci-agent",
"rev": "e44538cf90ecd8173a6edf75f9a14364d3b9962f",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "hercules-ci-agent",
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
@ -62,11 +100,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1698134075,
"narHash": "sha256-foCD+nuKzfh49bIoiCBur4+Fx1nozo+4C/6k8BYk4sg=",
"lastModified": 1688322751,
"narHash": "sha256-eW62dC5f33oKZL7VWlomttbUnOTHrAbte9yNUNW8rbk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8efd5d1e283604f75a808a20e6cde0ef313d07d4",
"rev": "0fbe93c5a7cac99f90b60bdf5f149383daaa615f",
"type": "github"
},
"original": {
@ -79,7 +117,7 @@
"nixpkgs-update": {
"inputs": {
"mmdoc": [],
"nixpkgs": "nixpkgs_2"
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1698207498,
@ -113,6 +151,22 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1698134075,
"narHash": "sha256-foCD+nuKzfh49bIoiCBur4+Fx1nozo+4C/6k8BYk4sg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8efd5d1e283604f75a808a20e6cde0ef313d07d4",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1672428209,
"narHash": "sha256-eejhqkDz2cb2vc5VeaWphJz8UXNuoNoM8/Op8eWv2tQ=",
@ -150,8 +204,9 @@
"inputs": {
"disko": "disko",
"flake-parts": "flake-parts",
"hercules-ci-agent": "hercules-ci-agent",
"nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs_2",
"nixpkgs-update": "nixpkgs-update",
"nixpkgs-update-github-releases": "nixpkgs-update-github-releases",
"nur-update": "nur-update",

View file

@ -38,6 +38,9 @@
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
tf-pkgs.url = "github:NixOS/nixpkgs/982b24c40e743793c966b47b3bb3699881489ae0";
hercules-ci-agent.url = "github:hercules-ci/hercules-ci-agent";
hercules-ci-agent.inputs.flake-parts.follows = "flake-parts";
};
outputs = inputs @ { flake-parts, self, ... }:

View file

@ -1,5 +1,7 @@
{ inputs, pkgs, ... }:
{
# hercules secrets are installed manually from ./secrets.yaml
# https://docs.hercules-ci.com/hercules-ci/getting-started/deploy/nix-darwin
services.hercules-ci-agent.enable = true;
services.hercules-ci-agent.package = inputs.hercules-ci-agent.packages.${pkgs.stdenv.hostPlatform.system}.hercules-ci-agent;
}

View file

@ -1,4 +1,4 @@
{ config, ... }:
{ config, inputs, pkgs, ... }:
let
herculesSecret = {
owner = "hercules-ci-agent";
@ -13,6 +13,7 @@ in
services.hercules-ci-agent = {
enable = true;
package = inputs.hercules-ci-agent.packages.${pkgs.stdenv.hostPlatform.system}.hercules-ci-agent;
settings = {
binaryCachesPath = secrets."binary-caches.json".path;
clusterJoinTokenPath = secrets."cluster-join-token.key".path;