diff options
Diffstat (limited to 'cluster')
-rw-r--r-- | cluster/staging/app/garage/deploy/garage-nix2.hcl (renamed from cluster/staging/app/garage/deploy/garage-nix-exec2.hcl) | 13 | ||||
-rw-r--r-- | cluster/staging/cluster.nix | 21 |
2 files changed, 11 insertions, 23 deletions
diff --git a/cluster/staging/app/garage/deploy/garage-nix-exec2.hcl b/cluster/staging/app/garage/deploy/garage-nix2.hcl index ad36b4e..a60b506 100644 --- a/cluster/staging/app/garage/deploy/garage-nix-exec2.hcl +++ b/cluster/staging/app/garage/deploy/garage-nix2.hcl @@ -57,22 +57,21 @@ job "garage-staging" { # } task "server" { - driver = "exec2" + driver = "nix2" config { - #command = "/usr/bin/env" - command = "/run/current-system/sw/bin/nix" - args = [ - "run", + packages = [ + "bash", # so that we can enter a shell inside container "git+https://git.deuxfleurs.fr/Deuxfleurs/garage.git?ref=nix-remove-system&rev=60c26fbc628d7b450ae39214b578ab6a30583d5c", - "--", - "server" ] + command = "garage" + args = [ "server" ] bind = { "/mnt/storage/garage-staging/data" = "/data", "/mnt/ssd/garage-staging/meta" = "/meta", } } + user = "root" template { data = file("../config/garage.toml") diff --git a/cluster/staging/cluster.nix b/cluster/staging/cluster.nix index 79e3cf0..71a8d98 100644 --- a/cluster/staging/cluster.nix +++ b/cluster/staging/cluster.nix @@ -77,16 +77,16 @@ ## EXPERIMENTAL ON STAGING: NIX NOMAD JOBS services.nomad.dropPrivileges = false; - # ----- nomad-driver-nix & nomad-driver-exec2 ----- + # ----- nomad-driver-nix & nomad-driver-nix2 ----- services.nomad.extraSettingsPlugins = let nomad_driver_nix = import ./nomad-driver-nix.nix { inherit pkgs; }; - nomad_driver_exec2 = import ./nomad-driver-exec2.nix { inherit pkgs; }; + nomad_driver_nix2 = import ./nomad-driver-nix2.nix { inherit pkgs; }; in [ (pkgs.symlinkJoin { name = "nomad-drivers"; paths = [ nomad_driver_nix - nomad_driver_exec2 + nomad_driver_nix2 ]; }) ]; @@ -99,22 +99,11 @@ # default config for the exec2 driver services.nomad.settings.plugin = [ { - "exec2-driver" = [ + "nix2-driver" = [ { config = [ { - bind_read_only = { - "/etc/static" = "/etc/static"; - "/etc/passwd" = "/etc/passwd"; - "/etc/resolv.conf" = "/etc/resolv.conf"; - "/etc/nix/nix.conf" = "/etc/nix/nix.conf"; - "/etc/ssl" = "/etc/ssl"; - "/etc/nsswitch.conf" = "/etc/nsswitch.conf"; - "/nix" = "/nix"; - "/bin" = "/bin"; - "/usr" = "/usr"; - "/run/current-system/sw" = "/run/current-system/sw"; - }; + # default_nixpkgs = "github:nixos/nixpkgs/nixos-22.11"; } ]; } |