diff --git a/containers/hercules.nix b/containers/hercules.nix index b1fb45f..bdfcc1f 100644 --- a/containers/hercules.nix +++ b/containers/hercules.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ config, pkgs, lib, inputs, ... }: # A separate container to run Hercules effects # https://docs.hercules-ci.com/hercules-ci/effects/ @@ -7,6 +7,20 @@ ephemeral = false; autoStart = true; config = { config, pkgs, ... }: { + imports = [ + (inputs.hercules-ci-agent + "/module.nix") + /* (builtins.fetchTarball + { + url = "https://github.com/hercules-ci/hercules-ci-agent/archive/ecac058b7633f969350cbc22e8c8a7466bcbc13f.tar.gz"; + sha256 = "sha256-I7Npzb0Zf58b68o1FDDphg2FsHp/V/Jhub3DzSXIBE4="; + } + + "/module.nix" + ) */ + ]; + # Enabling this triggers https://github.com/hercules-ci/hercules-ci-agent/issues/341 + #services.hercules-ci-agent.enable = true; + #services.hercules-ci-agent.concurrentTasks = 4; + networking.firewall.allowedTCPPorts = [ ]; }; }; diff --git a/flake.lock b/flake.lock index 2a77e22..d91b2e3 100644 --- a/flake.lock +++ b/flake.lock @@ -366,6 +366,23 @@ "type": "github" } }, + "hercules-ci-agent": { + "flake": false, + "locked": { + "lastModified": 1637162411, + "narHash": "sha256-cou5C/MeoFSaKnZp326ciMv/bjqzJw0m+JX1SQnrHzQ=", + "owner": "hercules-ci", + "repo": "hercules-ci-agent", + "rev": "d8a96f2367f1381a188dc498fa243747ce827b1c", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "ref": "master", + "repo": "hercules-ci-agent", + "type": "github" + } + }, "himalaya": { "inputs": { "crate2nix": "crate2nix", @@ -766,6 +783,7 @@ "inputs": { "emacs-overlay": "emacs-overlay", "emanote": "emanote", + "hercules-ci-agent": "hercules-ci-agent", "himalaya": "himalaya", "home-manager": "home-manager", "neovim-nightly-overlay": "neovim-nightly-overlay", diff --git a/flake.nix b/flake.nix index 43ad7be..eb0db02 100644 --- a/flake.nix +++ b/flake.nix @@ -19,6 +19,10 @@ neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; nix-doom-emacs.url = "github:vlaci/nix-doom-emacs"; emanote.url = "github:srid/emanote"; + hercules-ci-agent = { + url = "github:hercules-ci/hercules-ci-agent/master"; + flake = true; + }; }; outputs = inputs@{ self, home-manager, nixpkgs, ... }: diff --git a/hosts/thick.nix b/hosts/thick.nix index 651f046..f031b85 100644 --- a/hosts/thick.nix +++ b/hosts/thick.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, modulesPath, ... }: +{ config, pkgs, lib, modulesPath, inputs, ... }: { imports =