A driver to run Nix jobs on Nomad
Find a file
2022-11-29 15:37:55 +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 Rename to Deuxfleurs 2022-11-29 14:44:49 +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 Rename to Deuxfleurs 2022-11-29 14:44:49 +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 Rename to Deuxfleurs 2022-11-29 14:44:49 +01:00
README.md Fix requirements in readme 2022-11-29 15:37:55 +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.19 or later (to compile the plugin)
  • Nomad v1.3 or later (to run the plugin)
  • Nix v2.11 or later (to run the plugin), either through NixOS or installed in root mode

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.