hosts: fix Hercules CI effect metadata
This commit is contained in:
parent
d7cd04ae58
commit
ee6407f7c5
1 changed files with 9 additions and 4 deletions
|
@ -3,7 +3,6 @@
|
||||||
let
|
let
|
||||||
inherit (lib) elem mapAttrs toLower;
|
inherit (lib) elem mapAttrs toLower;
|
||||||
inherit (config) gods defaultEffectSystem;
|
inherit (config) gods defaultEffectSystem;
|
||||||
inherit (config.herculesCI) branch;
|
|
||||||
inherit (self) nixosConfigurations;
|
inherit (self) nixosConfigurations;
|
||||||
|
|
||||||
meta = import ../tools/meta.nix;
|
meta = import ../tools/meta.nix;
|
||||||
|
@ -12,7 +11,7 @@ let
|
||||||
|
|
||||||
withEffectSystem = withSystem defaultEffectSystem;
|
withEffectSystem = withSystem defaultEffectSystem;
|
||||||
|
|
||||||
callUpon = name: host: withEffectSystem ({ hci-effects, ... }: let
|
callUpon = name: host: withEffectSystem ({ config, hci-effects, ... }: let
|
||||||
inherit (hci-effects) runIf runNixOS;
|
inherit (hci-effects) runIf runNixOS;
|
||||||
inherit (host.enterprise) subdomain;
|
inherit (host.enterprise) subdomain;
|
||||||
|
|
||||||
|
@ -20,7 +19,8 @@ let
|
||||||
|
|
||||||
deploy-rs = inputs.deploy-rs.lib."${host.system}";
|
deploy-rs = inputs.deploy-rs.lib."${host.system}";
|
||||||
in {
|
in {
|
||||||
effect = runIf (elem branch [ "master" "staging" ]) (runNixOS {
|
effect = { branch, ... }: runIf (elem branch [ "master" "staging" ])
|
||||||
|
(runNixOS {
|
||||||
requiredSystemFeatures = [ "hci-deploy-agent-nixos" ];
|
requiredSystemFeatures = [ "hci-deploy-agent-nixos" ];
|
||||||
|
|
||||||
inherit (nixosConfigurations.${name}) config;
|
inherit (nixosConfigurations.${name}) config;
|
||||||
|
@ -53,7 +53,12 @@ let
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
flake.effects = mapAttrs (pick "effect") calledUponHours;
|
herculesCI = { config, ... }: let
|
||||||
|
powers = mapAttrs (pick "effect") calledUponHours;
|
||||||
|
wield = mapAttrs (_: wieldPowerWith: wieldPowerWith config.repo);
|
||||||
|
in {
|
||||||
|
onPush.default.outputs.effects = wield powers;
|
||||||
|
};
|
||||||
|
|
||||||
flake.deploy.nodes = mapAttrs (pick "deploy") calledUponHours;
|
flake.deploy.nodes = mapAttrs (pick "deploy") calledUponHours;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue