aboutsummaryrefslogtreecommitdiff
path: root/cluster/staging/app
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-11-16 16:28:18 +0100
committerAlex Auvolat <alex@adnab.me>2022-11-16 16:28:18 +0100
commit49b0dc2d5bfe9b92e6e02e6f0fa1076c4204f8b8 (patch)
treedcbf0f2b2c214f135a24dc9adc24d3a9856bdaf4 /cluster/staging/app
parenteac950c47f3bcedbd02b5bd71a8f42084c643854 (diff)
downloadnixcfg-49b0dc2d5bfe9b92e6e02e6f0fa1076c4204f8b8.tar.gz
nixcfg-49b0dc2d5bfe9b92e6e02e6f0fa1076c4204f8b8.zip
poc 2 for nix containers: use nomad-driver-nix
Diffstat (limited to 'cluster/staging/app')
-rw-r--r--cluster/staging/app/dummy/deploy/dummy-nginx.hcl39
1 files changed, 4 insertions, 35 deletions
diff --git a/cluster/staging/app/dummy/deploy/dummy-nginx.hcl b/cluster/staging/app/dummy/deploy/dummy-nginx.hcl
index 5f3d5f6..8e2dd43 100644
--- a/cluster/staging/app/dummy/deploy/dummy-nginx.hcl
+++ b/cluster/staging/app/dummy/deploy/dummy-nginx.hcl
@@ -5,17 +5,6 @@ job "dummy-nginx" {
group "nginx" {
count = 1
- volume "nix-store" {
- type = "host"
- source = "nix-store"
- read_only = true
- }
- volume "nix-current-system-bin" {
- type = "host"
- source = "nix-current-system-bin"
- read_only = true
- }
-
network {
port "http" {
to = 8080
@@ -23,32 +12,12 @@ job "dummy-nginx" {
}
task "not-actually-nginx" {
- driver = "exec"
+ driver = "nix"
config {
- command = "env"
- args = [
- "/run/current-system/sw/bin/nix-shell",
- "--run", "python3 -m http.server 8080"
+ packages = [
+ "github:nixos/nixpkgs/nixos-21.05#python3",
]
- }
- env = {
- NIX_PATH = "nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos"
- }
-
- volume_mount {
- volume = "nix-store"
- read_only = true
- destination = "/nix"
- }
- volume_mount {
- volume = "nix-current-system-bin"
- read_only = true
- destination = "/run/current-system/sw/bin"
- }
-
- template {
- data = file("shell.nix")
- destination = "shell.nix"
+ command = [ "/bin/python3", "-m", "http.server", "8080" ]
}
}