A driver to run Nix jobs on Nomad
Find a file
2022-11-29 13:32:47 +01:00
example Allow outside world DNS configuration to be used 2022-11-29 13:14:34 +01:00
executor Ability to run Nix jobs 2022-11-29 11:41:40 +01:00
nix2 correctly call package nomad-driver-nix2 2022-11-29 13:32:47 +01:00
.gitignore Rename driver to nix2 2022-11-29 09:46:43 +01:00
GNUmakefile Rename driver to nix2 2022-11-29 09:46:43 +01:00
go.mod correctly call package nomad-driver-nix2 2022-11-29 13:32:47 +01:00
go.sum First build as external plugin 2022-11-28 12:37:50 +01:00
LICENSE Initial commit 2022-11-28 11:33:28 +01:00
main.go correctly call package nomad-driver-nix2 2022-11-29 13:32:47 +01:00
README.md Write README 2022-11-29 13:19:08 +01:00

Nomad Nix Driver Plugin

A Nomad driver to run Nix jobs. Uses the same isolation mechanism as the exec driver. Partially based on nomad-driver-nix

Requirements

  • Go v1.18 or later (to compile the plugin)
  • Nomad v0.9+ (to run the plugin)

Building and using the Nix driver plugin

To build the plugin and run a dev agent:

$ make build
$ nomad agent -dev -config=./example/agent.hcl -plugin-dir=$(pwd)

# in another shell
$ nomad run ./example/example-batch.hcl
$ nomad run ./example/example-service.hcl
$ nomad logs <ALLOCATION ID>

Writing Nix job specifications

See documentation comments in example HCL files.