diff --git a/effects/push-cache/default.nix b/effects/push-cache/default.nix new file mode 100644 index 0000000..1a9f2e9 --- /dev/null +++ b/effects/push-cache/default.nix @@ -0,0 +1,160 @@ +{ lib, withSystem, config, ... }: +let pkgs-x86_64-linux = withSystem "x86_64-linux" ({ pkgs, ... }: pkgs); +in { + imports = [ ../../flake-module.nix ]; + + options = { + push-cache-effect = { + enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = '' + Enables an effect that pushes certain outputs to a different binary cache. + + Hercules CI normally pushes everything to the cache(s) configured on the agent. This effect supplements that behavior by letting you push a subset of those to a different cache. + Note that it only pushes the output closure, and not the closures of build dependencies used during the build stage of the CI job. (Unless those closures happen to also be part of the output or "runtime" closure) + ''; + }; + attic-client-pkg = lib.mkOption { + type = lib.types.package; + description = '' + Version of the attic-client package to use on \"x86_64-linux\". + + Hint: You can use `attic.packages.x86_64-linux.attic-client` from the attic flake. + ''; + default = pkgs-x86_64-linux.attic-client or (throw + "push-cache-effect.attic-client-pkg: It seems that attic hasn't been packaged in Nixpkgs (yet?). Please check or set