https://github.com/hercules-ci/hercules-ci-effects
Expressions to change the world (just a tiny bit)
https://github.com/hercules-ci/hercules-ci-effects
continuous-delivery continuous-deployment continuous-testing hercules-ci-effects nix
Last synced: 3 months ago
JSON representation
Expressions to change the world (just a tiny bit)
- Host: GitHub
- URL: https://github.com/hercules-ci/hercules-ci-effects
- Owner: hercules-ci
- License: apache-2.0
- Created: 2020-09-29T19:02:51.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2025-05-15T04:54:45.000Z (5 months ago)
- Last Synced: 2025-05-15T05:30:58.605Z (5 months ago)
- Topics: continuous-delivery, continuous-deployment, continuous-testing, hercules-ci-effects, nix
- Language: Nix
- Homepage:
- Size: 545 KB
- Stars: 20
- Watchers: 3
- Forks: 11
- Open Issues: 39
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-flake-parts - hercules-ci-effects - CI/CD integration for flake-parts. (Flake Modules / Community Modules)
README
# hercules-ci-effects
Expressions to change the world (just a tiny bit)# About the project
Hercules CI Effects as implemented by the agent are a fairly low-level interface
for executing programs that interact with the Nix store, centralized state and
the real world.This repository provides useful abstractions and implementations to automate
tasks such as deployment.# Getting started
## Prerequisites
- You've [built](https://docs.hercules-ci.com/hercules-ci/getting-started/) your repo's `ci.nix` on Hercules CI
## Installation
- Import this repo in a project where you want to automate something.
- Expose the return value of one of the functions below as an attribute in your `ci.nix`.
See [the NixOS deployment guide](https://docs.hercules-ci.com/hercules-ci-effects/guide/deploy-a-nixos-machine.html) for an example.
# Usage
See the Nix Functions Reference and Bash Functions Reference on the [documentation site](https://docs.hercules-ci.com/hercules-ci-effects/).
Here's an example:
```nix
#ci.nix
{ src ? { ref = null; } }: {production = runIf (src.ref == "refs/heads/master") (
effects.runNixOps {
name = "production";
src = pkgs.lib.cleanSource ./.; # NixOps reads your Nix files
networkFiles = ["network.nix"];
secretsMap.aws = "production-aws";
}
);
}
```# License
Distributed under the Apache License Version 2.0. See LICENSE for more information.
# Contact
Email: support@hercules-ci.com
Twitter: [@hercules_ci](https://twitter.com/hercules_ci)## Acknowledgements
* [hercules-ci-effects Contributors](https://github.com/hercules-ci/hercules-ci-effects/graphs/contributors)
* [Nix](https://nixos.org/nix)
* [NixOps](https://nixos.org/nixops)
* [nix-darwin](https://nixos.org/LnL7/nix-darwin)