No description
Find a file
JMARyA 577e5a4874
fix(modules): use pythonPackages directly and disable style checks
Replace python3.withPackages environments with direct pythonPackages
references in writePython3 (the former is not a valid `libraries` value).
Add doCheck = false across all Python modules to skip pycodestyle enforcement.

Add test-http thread exercising the http/http-request module end-to-end.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 02:01:34 +02:00
envs style: fmt 2026-04-19 22:27:34 +02:00
modules fix(modules): use pythonPackages directly and disable style checks 2026-05-23 02:01:34 +02:00
test_threads test: add complex_dag and dag-matrix test threads 2026-05-23 01:15:55 +02:00
threads fix(modules): use pythonPackages directly and disable style checks 2026-05-23 02:01:34 +02:00
flake.lock init: standard library foundation 2026-04-19 20:37:56 +02:00
flake.nix feat: add hello-moira package and flake-output test pipelines 2026-04-20 01:04:00 +02:00
README.md docs: rewrite README as a concise entrypoint 2026-05-23 01:24:41 +02:00

moira-modules

Standard library for moira — reusable environments, typed modules, and reference threads.


What's here

Directory Contents
envs/ Nix shell environments for common toolchains
modules/ Typed, reusable step implementations
threads/ Ready-to-use pipeline definitions

Import

# flake.nix
inputs.moira-modules.url = "git+https://git.hydrar.de/jmarya/moira-modules";
inputs.moira-modules.inputs.nixpkgs.follows = "nixpkgs";

Inside your outputs, bind moiraModules and moiraEnvironments per system:

outputs = { self, nixpkgs, moira-modules, ... }:
  flake-utils.lib.eachDefaultSystem (system: {
    moiraPipelines = {
      ci = moira-modules.moiraPipelines.${system}.ci;      # use a reference thread
    };
  });

Or reference them directly in thread files:

# threads/deploy.nix
{ moiraModules, moiraEnvironments, ... }:
{
  name = "deploy";
  trigger.on_push.branches = [ "main" ];
  env = moiraEnvironments.rust;

  steps = [
    { name = "test"; run = "cargo test --workspace"; }
    { name = "build"; run = "cargo build --release"; depends_on = [ "test" ]; }
    {
      name = "notify";
      use  = moiraModules."http/http-request";
      "with" = {
        method   = "POST";
        url      = "https://hooks.example.com/deploy";
        body_json = { sha = "${{ git.sha }}"; status = "ok"; };
      };
      depends_on = [ "build" ];
    }
  ];
}

Environments

Name Provides
rust cargo rustc clippy rustfmt pkg-config openssl
node nodejs npm
python python3 pip virtualenv
go go gopls gotools
docker docker docker-compose

Set on a thread (all steps share it) or on an individual step to override.


Modules

Module What it does
http/http-request HTTP requests — GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
git/git Git operations — clone, commit, push, pull, tag, branch, merge
ssh/ssh Execute commands or transfer files over SSH
s3/s3 S3-compatible storage — ls, cp, sync, presign, … (AWS, MinIO, R2)
compression/compress Compress and extract tar, gz, bz2, xz, zip
crypto/crypto Hash, HMAC, sign, verify, key generation
jwt/jwt Sign, verify, and decode JWTs (HS*, RS*, ES*, EdDSA)
totp/totp Generate and verify TOTP tokens

Modules have a typed interface — declared inputs and outputs. Inputs are passed via with; outputs are available in downstream steps as ${{ steps.NAME.outputs.KEY }}. Secret inputs take a secret name, not the value — the agent fetches and injects it at runtime.


See also