diff options
| author | seth <[email protected]> | 2024-04-06 22:08:07 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2024-04-06 22:59:56 -0400 |
| commit | cdeb7d50f232103294a2bb36525a6d9f552fb4ed (patch) | |
| tree | 3fd24ce84ae35fe9282b93edcf5659c9ae01bf0a /ci.nix | |
| parent | 5d725b0db9a0e57533e67e299f6213fa5d90203a (diff) | |
separate everything from flake.nix again
Diffstat (limited to 'ci.nix')
| -rw-r--r-- | ci.nix | 32 |
1 files changed, 32 insertions, 0 deletions
@@ -0,0 +1,32 @@ +{self, ...}: { + perSystem = { + lib, + 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 + ); + }; +} |
