Home

nixpecker @472048245d0ca3d4188b5907141955bb19ad72b4 - refs - log -
-
https://git.jolheiser.com/nixpecker.git
Woodpecker config service for nix
nixpecker / README.md
- raw -
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# nixpecker

A [Woodpecker Config Extension](https://woodpecker-ci.org/docs/usage/extensions/configuration-extension) to parse [nix](https://nixos.org/) configs.

**NOTE:** This extension will evaluate nix expressions, which can do much more than simple configuration. Only run this extension if you expect trusted nix expressions only.

## Configuration

Configuration can be provided via flags, environment variables (prefixed with `NIXPECKER_`), or a [nix](https://nixos.org/) config file (default: `.config.nix`, override with `--config`).

| Flag | Short | Env | Default | Description |
|------|-------|-----|---------|-------------|
| `--port` | `-p` | `NIXPECKER_PORT` | `0` | Port to listen on |
| `--public-key` | `-k` | `NIXPECKER_PUBLIC_KEY` | | Woodpecker public key for verification |
| `--public-key-file` | `-K` | `NIXPECKER_PUBLIC_KEY_FILE` | | Path to file containing the Woodpecker public key |
| `--log-level` | `-l` | `NIXPECKER_LOG_LEVEL` | `info` | Log level (`debug`, `info`, `warn`, `error`) |
| `--json` | `-j` | `NIXPECKER_JSON` | `false` | Enable JSON logging |
| `--nix` | `-n` | `NIXPECKER_NIX` | `nix binary found on PATH` | Path to a nix binary if not on PATH |

### Config file example

```nix
let
  port = 8080;
  pubkey = "/etc/woodpecker/public.key";
in {
  inherit port;
  public-key-file = pubkey;
  log-level = "info";
}
```

## License

[MIT](LICENSE)