diff options
| author | seth <[email protected]> | 2024-05-22 20:38:40 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2024-05-22 20:37:10 -0600 |
| commit | 573c04045c247791523062205dcc76b5cf69066c (patch) | |
| tree | ad0d6c53b8eb7dda17a30ccb7e02a30a6622399f /parts/ci.nix | |
| parent | 250d3ef82f6528647809a60df75aa54e235a7a0a (diff) | |
ci: garnix -> gha for 12343894th time
Diffstat (limited to 'parts/ci.nix')
| -rw-r--r-- | parts/ci.nix | 51 |
1 files changed, 22 insertions, 29 deletions
diff --git a/parts/ci.nix b/parts/ci.nix index 5ddc81c..ba26af5 100644 --- a/parts/ci.nix +++ b/parts/ci.nix @@ -1,34 +1,27 @@ -{self, ...}: { - perSystem = { - lib, +{ + lib, + self, + withSystem, + ... +}: let + ciSystem = "x86_64-linux"; + derivFromCfg = deriv: deriv.config.system.build.toplevel or deriv.activationPackage; + mapCfgsToDerivs = lib.mapAttrs (lib.const derivFromCfg); +in { + flake.hydraJobs = withSystem ciSystem ({ pkgs, - system, self', ... }: { - packages = { - ciGate = let - toTopLevel = cfg: cfg.config.system.build.toplevel or cfg.activationPackage; - isCompatible = cfg: cfg.pkgs.system == system; - - configurations = - map - (type: - lib.mapAttrs (lib.const toTopLevel) - (lib.filterAttrs (lib.const isCompatible) self.${type})) - [ - "nixosConfigurations" - "darwinConfigurations" - "homeConfigurations" - ]; - - required = lib.concatMap lib.attrValues ( - lib.flatten [self'.checks self'.devShells configurations] - ); - in - pkgs.writeText "ci-gate" ( - lib.concatMapStringsSep "\n" toString required - ); - }; - }; + inherit (self') checks; + inherit (self') devShells; + darwinConfigurations = mapCfgsToDerivs self.darwinConfigurations; + homeConfigurations = mapCfgsToDerivs self.homeConfigurations; + nixosConfigurations = + mapCfgsToDerivs self.nixosConfigurations + // { + # please add aarch64 runners github...please... + atlas = lib.deepSeq (derivFromCfg self.nixosConfigurations.atlas).drvPath pkgs.emptyFile; + }; + }); } |
