From fd6cb3a64932954b687109e119aa8b643c8757d5 Mon Sep 17 00:00:00 2001 From: Jack O'Sullivan Date: Sun, 17 Jul 2022 03:16:41 +0100 Subject: [PATCH] Add more Hercules jobs --- flake.nix | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 8a39770..035aa3a 100644 --- a/flake.nix +++ b/flake.nix @@ -40,7 +40,7 @@ }: let inherit (builtins) mapAttrs; - inherit (lib) recurseIntoAttrs evalModules; + inherit (lib) genAttrs recurseIntoAttrs evalModules; inherit (lib.flake) flattenTree eachDefaultSystem; inherit (lib.my) mkDefaultSystemsPkgs flakePackageOverlay; @@ -137,10 +137,26 @@ homeConfigurations = mapAttrs (_: s: s.configuration) nixfiles.config.home-manager.homes; deploy = nixfiles.config.deploy-rs.rendered; - herculesCI = { + + # TODO: Modularise? + herculesCI = + let + system = n: self.nixosConfigurations."${n}".config.system.build.toplevel; + container = n: self.nixosConfigurations."${n}".config.my.buildAs.container; + home = n: self.homeConfigurations."${n}".activationPackage; + in + { onPush = { default.outputs = { - installer = nixfiles.config.nixos.systems.installer.configuration.config.my.buildAs.iso; + installer = self.nixosConfigurations.installer.config.my.buildAs.iso; + }; + systems.outputs = { + colony = system "colony"; + vms = genAttrs [ "estuary" "shill" ] system; + containers = genAttrs [ "jackflix" "middleman" "chatterbox" ] container; + }; + homes.outputs = { + castle = home "dev@castle"; }; }; };