A driver to run Nix jobs on Nomad
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Go to file
Alex 59aba76075
Ability to use taskdir as flake; change nixpkgs syntax
6 months ago
example Ability to use taskdir as flake; change nixpkgs syntax 6 months ago
executor Ability to run Nix jobs 6 months ago
nix2 Ability to use taskdir as flake; change nixpkgs syntax 6 months ago
.gitignore Rename driver to nix2 6 months ago
GNUmakefile Rename driver to nix2 6 months ago
LICENSE Initial commit 6 months ago
README.md Fix requirements in readme 6 months ago
go.mod Rename to Deuxfleurs 6 months ago
go.sum First build as external plugin 6 months ago
main.go Rename to Deuxfleurs 6 months ago

README.md

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.