diff --git a/nix/gitlab-ci/default.nix b/nix/gitlab-ci/default.nix index 2717d0f549..772c192e9b 100644 --- a/nix/gitlab-ci/default.nix +++ b/nix/gitlab-ci/default.nix @@ -22,6 +22,17 @@ let }; tags = [ "cacher" ]; }; + + nixCacheMacOS = { + stage = "build"; + image = "nixos/nix:latest"; + script = [ + "nix run -f ./ third_party.nixpkgs.bash -c ./hack/populate_secrets.sh" + "nix build -v -f ./ci-root.nix --substituters \"https://cache.nixos.org/ s3://lukegb-nix-cache?endpoint=storage.googleapis.com&trusted=1\"" + "nix copy -v --to 's3://lukegb-nix-cache?endpoint=storage.googleapis.com' ./result" + ]; + tags = [ "macos" ]; + }; } // (lib.mapAttrs deployStage deployMachs); deployMachs = lib.filterAttrs (name: cfg: cfg.config.my.deploy.enable) depot.ops.nixos.systemConfigs;