summaryrefslogtreecommitdiff
path: root/repo
diff options
context:
space:
mode:
authorseth <[email protected]>2024-02-08 22:11:23 -0500
committerseth <[email protected]>2024-02-09 01:17:16 -0500
commit36fc22ff3d454fd53094aaa5c22ed8bb365bc327 (patch)
tree36519607c3d99a5043a25e58ad478b51dd3560d3 /repo
parent3f19e4f7420916c45d6c8a1cab5b476b1c863ed0 (diff)
ci!: switch back to garnix & remove deploy workflows
i don't need terranix to deployed on each run, i can do it manually i can also have devices pull from this flake for updates instead of always pushing when they hit `main`
Diffstat (limited to 'repo')
-rw-r--r--repo/ci.nix49
1 files changed, 27 insertions, 22 deletions
diff --git a/repo/ci.nix b/repo/ci.nix
index 8538d28..05fd106 100644
--- a/repo/ci.nix
+++ b/repo/ci.nix
@@ -1,24 +1,29 @@
-{
- lib,
- self,
- ...
-}: {
- flake.hydraJobs = let
- ciSystems = ["x86_64-linux"];
- ci = self.lib.ci ciSystems;
- in
- builtins.foldl' lib.recursiveUpdate {} [
- (
- lib.genAttrs
- ["nixosConfigurations" "homeConfigurations"]
- (
- type: ci.mapCfgsToDerivs (ci.getCompatibleCfgs self."${type}")
- )
- )
- (
- lib.genAttrs
- ["checks" "devShells"]
- (type: ci.getOutputs self.${type})
- )
+{self, ...}: {
+ perSystem = {
+ lib,
+ pkgs,
+ system,
+ self',
+ ...
+ }: let
+ ci = self.lib.ci [system];
+
+ configurations = map (type: ci.mapCfgsToDerivs (ci.getCompatibleCfgs self.${type})) [
+ "nixosConfigurations"
+ "darwinConfigurations"
+ "homeConfigurations"
];
+
+ required = lib.concatMap lib.attrValues (
+ [
+ self'.checks
+ self'.devShells
+ ]
+ ++ configurations
+ );
+ in {
+ packages.ciGate = pkgs.writeText "ci-gate" (
+ lib.concatMapStringsSep "\n" toString required
+ );
+ };
}