From 84912e2cfb2e5c7e737dd4cd8cf09a8f30aaf685 Mon Sep 17 00:00:00 2001 From: "Chinmay D. Pai" Date: Sat, 25 Nov 2023 01:30:10 +0530 Subject: [PATCH] fix: add nix store as host volume for nomad Signed-off-by: Chinmay D. Pai --- modules/programs/nomad/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/programs/nomad/default.nix b/modules/programs/nomad/default.nix index 681afd9..50ec43a 100644 --- a/modules/programs/nomad/default.nix +++ b/modules/programs/nomad/default.nix @@ -4,7 +4,7 @@ enable = true; dropPrivileges = false; enableDocker = true; - extraPackages = with pkgs; [cni-plugins cacert]; + extraPackages = with pkgs; [cni-plugins] ++ stdenv.initialPath; package = pkgs.nomad_1_6; settings = { datacenter = "trench"; @@ -46,6 +46,14 @@ artifact = { disable_filesystem_isolation = true; }; + # Required for `exec` driver deployments + # bind-mounts the nix store to resolve symlinks + host_volume = { + "nix" = { + path = "/nix"; + read_only = true; + }; + }; }; plugin."docker".config = {