From cbde799457a8470cd64a09d10827577d005ca6f8 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Mon, 28 Nov 2022 18:08:02 +0100 Subject: Make symlinks work --- example/example.hcl | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'example') diff --git a/example/example.hcl b/example/example.hcl index fbbe4ad..52b02f6 100644 --- a/example/example.hcl +++ b/example/example.hcl @@ -7,13 +7,36 @@ job "example" { driver = "exec2" config { - command = "/nix/store/y41s1vcn0irn9ahn9wh62yx2cygs7qjj-coreutils-8.32/bin/cat" - args = ["/host-etc/nscd.conf"] + command = "/sw/bin/nix" + args = [ + "--extra-experimental-features", "flakes", + "--extra-experimental-features", "nix-command", + "run", + "github:NixOS/nixpkgs#hello" + ] + bind = { + "/nix" = "/nix", + } + bind_read_only = { + "/etc" = "/etc", + "/home/lx/.nix-profile" = "/sw", + } + } + user = "lx" + } + + task "test" { + driver = "exec2" + + config { + command = "/nix/store/30j23057fqnnc1p4jqmq73p0gxgn0frq-bash-5.1-p16/bin/sh" + args = ["-c", "/nix/store/y41s1vcn0irn9ahn9wh62yx2cygs7qjj-coreutils-8.32/bin/ls /*; /nix/store/y41s1vcn0irn9ahn9wh62yx2cygs7qjj-coreutils-8.32/bin/id"] bind_read_only = { + "/etc" = "/etc", "/nix" = "/nix", - "/etc" = "/host-etc", } } + user = "lx" } } } -- cgit v1.2.3