diff options
| author | seth <[email protected]> | 2023-12-11 13:56:31 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2023-12-11 14:01:17 -0500 |
| commit | 0aaaf2dee691080da3d927ec1f5634dd671ba079 (patch) | |
| tree | 928942710f4e38087b76240d9854d6b77d3fec33 /ci.nix | |
| parent | ef70e7e565ab153ee5dc2bbe580c6442cfc5a4f5 (diff) | |
Revert "ci: use gha & attic for building/caching"
Diffstat (limited to 'ci.nix')
| -rw-r--r-- | ci.nix | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -0,0 +1,28 @@ +{self, ...}: { + perSystem = { + lib, + pkgs, + system, + config, + ... + }: let + # get applicable system configurations + configurations = lib.getAttrs ["darwinConfigurations" "homeConfigurations" "nixosConfigurations"] self; + + systems = lib.pipe (builtins.attrValues configurations) [ + (builtins.foldl' (acc: attr: acc // attr) {}) + (lib.filterAttrs (_: v: v.pkgs.system == system)) + (lib.mapAttrsToList (_: v: v.config.system.build.toplevel or v.activationPackage)) + ]; + in { + checks = { + ciGate = pkgs.runCommand "ci-gate" { + nativeBuildInputs = lib.concatLists [ + systems + # and other checks + (builtins.attrValues (builtins.removeAttrs config.checks ["ciGate"])) + ]; + } "touch $out"; + }; + }; +} |
