From eb9404d83c19f7d7452b797e996ab8773e985133 Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Sun, 19 Mar 2023 00:28:41 +0100 Subject: [PATCH] proxitok: Switch to oci-containers config --- container/proxitok/default.nix | 50 ++++++++++++++-------------------- 1 file changed, 20 insertions(+), 30 deletions(-) diff --git a/container/proxitok/default.nix b/container/proxitok/default.nix index dd9971c..4bf3028 100644 --- a/container/proxitok/default.nix +++ b/container/proxitok/default.nix @@ -1,37 +1,27 @@ { config, ... }: { - virtualisation.arion.projects.proxitok.settings = { - services = { - proxitok-web = { - service = { - image = "ghcr.io/pablouser1/proxitok:master"; - container_name = "proxitok-web"; - restart = "unless-stopped"; - depends_on = [ "proxitok-signer" ]; - ports = [ "127.0.0.1:8005:80" ]; - env_file = [ config.age.secrets.proxitok-environment.path ]; - volumes = [ - "/etc/container-proxitok/cache:/cache" - ]; - labels = { - "com.centurylinklabs.watchtower.enable" = "true"; - "io.containers.autoupdate" = "registry"; - }; - }; - }; + virtualisation.oci-containers.containers = { + proxitok-web = { + image = "ghcr.io/pablouser1/proxitok:master"; + dependsOn = [ "proxitok-signer" ]; + ports = [ "127.0.0.1:8005:80" ]; + environmentFiles = [ config.age.secrets.proxitok-environment.path ]; + volumes = [ + "/etc/container-proxitok/cache:/cache" + ]; + extraOptions = [ + "--label=com.centurylinklabs.watchtower.enable=true" + "--label=io.containers.autoupdate=registry" + ]; + }; - proxitok-signer = { - service = { - image = "ghcr.io/pablouser1/signtok:master"; - container_name = "proxitok-signer"; - restart = "unless-stopped"; - labels = { - "com.centurylinklabs.watchtower.enable" = "true"; - "io.containers.autoupdate" = "registry"; - }; - }; - }; + proxitok-signer = { + image = "ghcr.io/pablouser1/signtok:master"; + extraOptions = [ + "--label=com.centurylinklabs.watchtower.enable=true" + "--label=io.containers.autoupdate=registry" + ]; }; };