From e98e4f41f3a09a0e6b291b42d27188facd37aad9 Mon Sep 17 00:00:00 2001 From: Myned Date: Tue, 8 Oct 2024 18:23:50 -0500 Subject: [PATCH] containers: rename sevices to arion-* Signed-off-by: Myned --- options/custom/containers/actualbudget.nix | 20 ++-- options/custom/containers/coturn.nix | 24 ++--- options/custom/containers/forgejo.nix | 50 ++++----- options/custom/containers/foundryvtt.nix | 20 ++-- options/custom/containers/headscale.nix | 56 +++++----- options/custom/containers/homeassistant.nix | 18 ++-- options/custom/containers/mastodon.nix | 58 +++++----- options/custom/containers/netbox/default.nix | 102 +++++++++--------- options/custom/containers/nextcloud.nix | 90 ++++++++-------- options/custom/containers/redlib.nix | 28 +++-- options/custom/containers/searxng/default.nix | 46 ++++---- 11 files changed, 234 insertions(+), 278 deletions(-) diff --git a/options/custom/containers/actualbudget.nix b/options/custom/containers/actualbudget.nix index b987214..f5316b7 100644 --- a/options/custom/containers/actualbudget.nix +++ b/options/custom/containers/actualbudget.nix @@ -12,18 +12,14 @@ in { #?? arion-actualbudget pull environment.shellAliases.arion-actualbudget = "sudo arion --prebuilt-file ${config.virtualisation.arion.projects.actualbudget.settings.out.dockerComposeYaml}"; - virtualisation.arion.projects.actualbudget = { - serviceName = "actualbudget"; - - settings.services = { - actualbudget.service = { - container_name = "actualbudget"; - image = "actualbudget/actual-server:24.9.0"; - ports = ["5006:5006"]; - restart = "unless-stopped"; - volumes = ["${config.custom.containers.directory}/actualbudget/data:/data"]; - # TODO: Set up trusted proxies - }; + virtualisation.arion.projects.actualbudget.settings.services = { + actualbudget.service = { + container_name = "actualbudget"; + image = "actualbudget/actual-server:24.9.0"; + ports = ["5006:5006"]; + restart = "unless-stopped"; + volumes = ["${config.custom.containers.directory}/actualbudget/data:/data"]; + # TODO: Set up trusted proxies }; }; }; diff --git a/options/custom/containers/coturn.nix b/options/custom/containers/coturn.nix index ba33596..a99e989 100644 --- a/options/custom/containers/coturn.nix +++ b/options/custom/containers/coturn.nix @@ -21,21 +21,17 @@ in { #?? arion-coturn pull environment.shellAliases.arion-coturn = "sudo arion --prebuilt-file ${config.virtualisation.arion.projects.coturn.settings.out.dockerComposeYaml}"; - virtualisation.arion.projects.coturn = { - serviceName = "coturn"; + virtualisation.arion.projects.coturn.settings.services = { + # https://conduwuit.puppyirl.gay/turn.html + coturn.service = { + container_name = "coturn"; + image = "coturn/coturn:4.6"; + network_mode = "host"; + restart = "unless-stopped"; - settings.services = { - # https://conduwuit.puppyirl.gay/turn.html - coturn.service = { - container_name = "coturn"; - image = "coturn/coturn:4.6"; - network_mode = "host"; - restart = "unless-stopped"; - - volumes = [ - "${config.custom.containers.directory}/coturn/coturn.conf:/etc/coturn/turnserver.conf" - ]; - }; + volumes = [ + "${config.custom.containers.directory}/coturn/coturn.conf:/etc/coturn/turnserver.conf" + ]; }; }; diff --git a/options/custom/containers/forgejo.nix b/options/custom/containers/forgejo.nix index 37f59a1..c2d8c4b 100644 --- a/options/custom/containers/forgejo.nix +++ b/options/custom/containers/forgejo.nix @@ -24,35 +24,31 @@ in { networking.firewall.allowedTCPPorts = [22]; # SSH - virtualisation.arion.projects.forgejo = { - serviceName = "forgejo"; + virtualisation.arion.projects.forgejo.settings.services = { + # https://codeberg.org/forgejo/forgejo + # https://forgejo.org/docs/latest/admin/ + #?? docker exec -it forgejo bash + #?? sudo -u git forgejo admin user create --username USERNAME --random-password --email EMAIL --admin + forgejo.service = { + container_name = "forgejo"; + depends_on = ["db"]; + env_file = [config.age.secrets."${config.custom.profile}/forgejo/.env".path]; + image = "codeberg.org/forgejo/forgejo:8"; + restart = "unless-stopped"; + volumes = ["${config.custom.containers.directory}/forgejo/data:/data"]; - settings.services = { - # https://codeberg.org/forgejo/forgejo - # https://forgejo.org/docs/latest/admin/ - #?? docker exec -it forgejo bash - #?? sudo -u git forgejo admin user create --username USERNAME --random-password --email EMAIL --admin - forgejo.service = { - container_name = "forgejo"; - depends_on = ["db"]; - env_file = [config.age.secrets."${config.custom.profile}/forgejo/.env".path]; - image = "codeberg.org/forgejo/forgejo:8"; - restart = "unless-stopped"; - volumes = ["${config.custom.containers.directory}/forgejo/data:/data"]; + ports = [ + "127.0.0.1:3333:3000" + "22:2222" + ]; + }; - ports = [ - "127.0.0.1:3333:3000" - "22:2222" - ]; - }; - - db.service = { - container_name = "forgejo-db"; - env_file = [config.age.secrets."${config.custom.profile}/forgejo/db.env".path]; - image = "postgres:15"; - restart = "unless-stopped"; - volumes = ["${config.custom.containers.directory}/forgejo/db:/var/lib/postgresql/data"]; - }; + db.service = { + container_name = "forgejo-db"; + env_file = [config.age.secrets."${config.custom.profile}/forgejo/db.env".path]; + image = "postgres:15"; + restart = "unless-stopped"; + volumes = ["${config.custom.containers.directory}/forgejo/db:/var/lib/postgresql/data"]; }; }; }; diff --git a/options/custom/containers/foundryvtt.nix b/options/custom/containers/foundryvtt.nix index 3d960f7..c4b336a 100644 --- a/options/custom/containers/foundryvtt.nix +++ b/options/custom/containers/foundryvtt.nix @@ -21,18 +21,14 @@ in { #?? arion-foundryvtt pull environment.shellAliases.arion-foundryvtt = "sudo arion --prebuilt-file ${config.virtualisation.arion.projects.foundryvtt.settings.out.dockerComposeYaml}"; - virtualisation.arion.projects.foundryvtt = { - serviceName = "foundryvtt"; - - settings.services = { - foundryvtt.service = { - container_name = "foundryvtt"; - env_file = [config.age.secrets."${config.custom.profile}/foundryvtt/.env".path]; - image = "felddy/foundryvtt:12"; - ports = ["127.0.0.1:30000:30000"]; - restart = "unless-stopped"; - volumes = ["${config.custom.containers.directory}/foundryvtt/data:/data"]; - }; + virtualisation.arion.projects.foundryvtt.settings.services = { + foundryvtt.service = { + container_name = "foundryvtt"; + env_file = [config.age.secrets."${config.custom.profile}/foundryvtt/.env".path]; + image = "felddy/foundryvtt:12"; + ports = ["127.0.0.1:30000:30000"]; + restart = "unless-stopped"; + volumes = ["${config.custom.containers.directory}/foundryvtt/data:/data"]; }; }; }; diff --git a/options/custom/containers/headscale.nix b/options/custom/containers/headscale.nix index efc53a7..ffc75d4 100644 --- a/options/custom/containers/headscale.nix +++ b/options/custom/containers/headscale.nix @@ -22,39 +22,35 @@ in { #?? arion-headscale pull environment.shellAliases.arion-headscale = "sudo arion --prebuilt-file ${config.virtualisation.arion.projects.headscale.settings.out.dockerComposeYaml}"; - virtualisation.arion.projects.headscale = { - serviceName = "headscale"; + virtualisation.arion.projects.headscale.settings.services = { + # https://headscale.net/ + # https://github.com/juanfont/headscale + # BUG: Does not support generic DoH/DoT + # https://github.com/juanfont/headscale/issues/1312 + headscale.service = { + command = "serve"; + container_name = "headscale"; + env_file = [config.age.secrets."${config.custom.profile}/headscale/.env".path]; + image = "headscale/headscale:v0.23.0-beta.4"; + restart = "unless-stopped"; - settings.services = { - # https://headscale.net/ - # https://github.com/juanfont/headscale - # BUG: Does not support generic DoH/DoT - # https://github.com/juanfont/headscale/issues/1312 - headscale.service = { - command = "serve"; - container_name = "headscale"; - env_file = [config.age.secrets."${config.custom.profile}/headscale/.env".path]; - image = "headscale/headscale:v0.23.0-beta.4"; - restart = "unless-stopped"; + ports = [ + "9999:9999" + "9090:9090" + ]; - ports = [ - "9999:9999" - "9090:9090" - ]; + volumes = [ + "${config.custom.containers.directory}/headscale/config:/etc/headscale" + "${config.custom.containers.directory}/headscale/data:/var/lib/headscale" - volumes = [ - "${config.custom.containers.directory}/headscale/config:/etc/headscale" - "${config.custom.containers.directory}/headscale/data:/var/lib/headscale" - - # Minimum config.yaml - # https://github.com/juanfont/headscale/blob/main/config-example.yaml - # https://github.com/juanfont/headscale/blob/main/integration/hsic/config.go - "${pkgs.writeText "config.yaml" '' - noise: - private_key_path: /var/lib/headscale/noise_private.key - ''}:/etc/headscale/config.yaml" - ]; - }; + # Minimum config.yaml + # https://github.com/juanfont/headscale/blob/main/config-example.yaml + # https://github.com/juanfont/headscale/blob/main/integration/hsic/config.go + "${pkgs.writeText "config.yaml" '' + noise: + private_key_path: /var/lib/headscale/noise_private.key + ''}:/etc/headscale/config.yaml" + ]; }; }; }; diff --git a/options/custom/containers/homeassistant.nix b/options/custom/containers/homeassistant.nix index 8199b0d..f404687 100644 --- a/options/custom/containers/homeassistant.nix +++ b/options/custom/containers/homeassistant.nix @@ -12,17 +12,13 @@ in { #?? arion-homeassistant pull environment.shellAliases.arion-homeassistant = "sudo arion --prebuilt-file ${config.virtualisation.arion.projects.homeassistant.settings.out.dockerComposeYaml}"; - virtualisation.arion.projects.homeassistant = { - serviceName = "homeassistant"; - - settings.services = { - homeassistant.service = { - container_name = "homeassistant"; - image = "homeassistant/home-assistant:2024.9.1"; - ports = ["8123:8123"]; - restart = "unless-stopped"; - volumes = ["${config.custom.containers.directory}/homeassistant/config:/config"]; - }; + virtualisation.arion.projects.homeassistant.settings.services = { + homeassistant.service = { + container_name = "homeassistant"; + image = "homeassistant/home-assistant:2024.9.1"; + ports = ["8123:8123"]; + restart = "unless-stopped"; + volumes = ["${config.custom.containers.directory}/homeassistant/config:/config"]; }; }; }; diff --git a/options/custom/containers/mastodon.nix b/options/custom/containers/mastodon.nix index 2f7052d..d5a751c 100644 --- a/options/custom/containers/mastodon.nix +++ b/options/custom/containers/mastodon.nix @@ -22,40 +22,36 @@ in { #?? arion-mastodon pull environment.shellAliases.arion-mastodon = "sudo arion --prebuilt-file ${config.virtualisation.arion.projects.mastodon.settings.out.dockerComposeYaml}"; - virtualisation.arion.projects.mastodon = { - serviceName = "mastodon"; + virtualisation.arion.projects.mastodon.settings.services = { + # https://github.com/linuxserver/docker-mastodon + # https://github.com/mastodon/mastodon/blob/main/docker-compose.yml + mastodon.service = { + container_name = "mastodon"; + env_file = [config.age.secrets."${config.custom.profile}/mastodon/.env".path]; + image = "lscr.io/linuxserver/mastodon:4.2.12"; + ports = ["3000:443"]; + restart = "unless-stopped"; + volumes = ["${config.custom.containers.directory}/mastodon/config:/config"]; - settings.services = { - # https://github.com/linuxserver/docker-mastodon - # https://github.com/mastodon/mastodon/blob/main/docker-compose.yml - mastodon.service = { - container_name = "mastodon"; - env_file = [config.age.secrets."${config.custom.profile}/mastodon/.env".path]; - image = "lscr.io/linuxserver/mastodon:4.2.12"; - ports = ["3000:443"]; - restart = "unless-stopped"; - volumes = ["${config.custom.containers.directory}/mastodon/config:/config"]; + depends_on = [ + "cache" + "db" + ]; + }; - depends_on = [ - "cache" - "db" - ]; - }; + cache.service = { + container_name = "mastodon-cache"; + image = "redis:latest"; + restart = "unless-stopped"; + volumes = ["${config.custom.containers.directory}/mastodon/cache:/data"]; + }; - cache.service = { - container_name = "mastodon-cache"; - image = "redis:latest"; - restart = "unless-stopped"; - volumes = ["${config.custom.containers.directory}/mastodon/cache:/data"]; - }; - - db.service = { - container_name = "mastodon-db"; - env_file = [config.age.secrets."${config.custom.profile}/mastodon/db.env".path]; - image = "postgres:15"; - restart = "unless-stopped"; - volumes = ["${config.custom.containers.directory}/mastodon/db:/var/lib/postgresql/data"]; - }; + db.service = { + container_name = "mastodon-db"; + env_file = [config.age.secrets."${config.custom.profile}/mastodon/db.env".path]; + image = "postgres:15"; + restart = "unless-stopped"; + volumes = ["${config.custom.containers.directory}/mastodon/db:/var/lib/postgresql/data"]; }; }; }; diff --git a/options/custom/containers/netbox/default.nix b/options/custom/containers/netbox/default.nix index 640854c..f3c84da 100644 --- a/options/custom/containers/netbox/default.nix +++ b/options/custom/containers/netbox/default.nix @@ -24,63 +24,59 @@ in { environment.shellAliases.arion-netbox = "sudo arion --prebuilt-file ${config.virtualisation.arion.projects.netbox.settings.out.dockerComposeYaml}"; # https://github.com/netbox-community/netbox-docker - virtualisation.arion.projects.netbox = { - serviceName = "netbox"; + # https://github.com/netbox-community/netbox-docker/blob/release/docker-compose.yml + virtualisation.arion.projects.netbox.settings.services = let + netbox = { + container_name = "netbox"; + depends_on = ["cache" "db"]; + env_file = [config.age.secrets."${config.custom.profile}/netbox/.env".path]; + image = "localhost/netbox"; # Built image + restart = "unless-stopped"; + user = "unit:root"; + volumes = ["${config.custom.containers.directory}/netbox/media:/opt/netbox/netbox/media"]; + }; + in { + netbox.service = + netbox + // { + ports = ["8585:8080"]; - # https://github.com/netbox-community/netbox-docker/blob/release/docker-compose.yml - settings.services = let - netbox = { - container_name = "netbox"; - depends_on = ["cache" "db"]; - env_file = [config.age.secrets."${config.custom.profile}/netbox/.env".path]; - image = "localhost/netbox"; # Built image - restart = "unless-stopped"; - user = "unit:root"; - volumes = ["${config.custom.containers.directory}/netbox/media:/opt/netbox/netbox/media"]; - }; - in { - netbox.service = - netbox - // { - ports = ["8585:8080"]; - - # https://github.com/netbox-community/netbox-docker/wiki/Using-Netbox-Plugins - #!! Context modifications require a rebuild - #?? arion-netbox build --no-cache - build.context = "${./.}"; - }; - - housekeeping.service = - netbox - // { - container_name = "netbox-housekeeping"; - command = ["/opt/netbox/housekeeping.sh"]; - depends_on = ["netbox"]; - }; - - worker.service = - netbox - // { - container_name = "netbox-worker"; - command = ["/opt/netbox/venv/bin/python" "/opt/netbox/netbox/manage.py" "rqworker"]; - depends_on = ["netbox"]; - }; - - cache.service = { - container_name = "netbox-cache"; - command = ["sh" "-c" "valkey-server --requirepass $$REDIS_PASSWORD"]; - env_file = [config.age.secrets."${config.custom.profile}/netbox/cache.env".path]; - image = "docker.io/valkey/valkey:8.0"; - restart = "unless-stopped"; + # https://github.com/netbox-community/netbox-docker/wiki/Using-Netbox-Plugins + #!! Context modifications require a rebuild + #?? arion-netbox build --no-cache + build.context = "${./.}"; }; - db.service = { - container_name = "netbox-db"; - env_file = [config.age.secrets."${config.custom.profile}/netbox/db.env".path]; - image = "docker.io/postgres:16"; - restart = "unless-stopped"; - volumes = ["${config.custom.containers.directory}/netbox/db:/var/lib/postgresql/data"]; + housekeeping.service = + netbox + // { + container_name = "netbox-housekeeping"; + command = ["/opt/netbox/housekeeping.sh"]; + depends_on = ["netbox"]; }; + + worker.service = + netbox + // { + container_name = "netbox-worker"; + command = ["/opt/netbox/venv/bin/python" "/opt/netbox/netbox/manage.py" "rqworker"]; + depends_on = ["netbox"]; + }; + + cache.service = { + container_name = "netbox-cache"; + command = ["sh" "-c" "valkey-server --requirepass $$REDIS_PASSWORD"]; + env_file = [config.age.secrets."${config.custom.profile}/netbox/cache.env".path]; + image = "docker.io/valkey/valkey:8.0"; + restart = "unless-stopped"; + }; + + db.service = { + container_name = "netbox-db"; + env_file = [config.age.secrets."${config.custom.profile}/netbox/db.env".path]; + image = "docker.io/postgres:16"; + restart = "unless-stopped"; + volumes = ["${config.custom.containers.directory}/netbox/db:/var/lib/postgresql/data"]; }; }; diff --git a/options/custom/containers/nextcloud.nix b/options/custom/containers/nextcloud.nix index 613cbe2..8b63e17 100644 --- a/options/custom/containers/nextcloud.nix +++ b/options/custom/containers/nextcloud.nix @@ -22,60 +22,56 @@ in { #?? arion-nextcloud pull environment.shellAliases.arion-nextcloud = "sudo arion --prebuilt-file ${config.virtualisation.arion.projects.nextcloud.settings.out.dockerComposeYaml}"; - virtualisation.arion.projects.nextcloud = { - serviceName = "nextcloud"; + virtualisation.arion.projects.nextcloud.settings.services = { + # https://github.com/nextcloud/docker + nextcloud.service = { + container_name = "nextcloud"; + env_file = [config.age.secrets."${config.custom.profile}/nextcloud/.env".path]; + image = "nextcloud:29-apache"; + ports = ["127.0.0.1:8181:80"]; + restart = "unless-stopped"; - settings.services = { - # https://github.com/nextcloud/docker - nextcloud.service = { - container_name = "nextcloud"; - env_file = [config.age.secrets."${config.custom.profile}/nextcloud/.env".path]; - image = "nextcloud:29-apache"; - ports = ["127.0.0.1:8181:80"]; - restart = "unless-stopped"; + volumes = [ + "${config.custom.containers.directory}/nextcloud/app:/var/www/html" + "${config.custom.containers.directory}/nextcloud/data:/var/www/html/data" + ]; - volumes = [ - "${config.custom.containers.directory}/nextcloud/app:/var/www/html" - "${config.custom.containers.directory}/nextcloud/data:/var/www/html/data" - ]; + depends_on = [ + "db" + "cache" + ]; + }; - depends_on = [ - "db" - "cache" - ]; - }; + cron.service = { + container_name = "nextcloud-cron"; + entrypoint = "/cron.sh"; + image = "nextcloud:29-apache"; + restart = "unless-stopped"; + volumes = + config.virtualisation.arion.projects.nextcloud.settings.services.nextcloud.service.volumes; # volumes_from - cron.service = { - container_name = "nextcloud-cron"; - entrypoint = "/cron.sh"; - image = "nextcloud:29-apache"; - restart = "unless-stopped"; - volumes = - config.virtualisation.arion.projects.nextcloud.settings.services.nextcloud.service.volumes; # volumes_from + depends_on = [ + "db" + "cache" + ]; + }; - depends_on = [ - "db" - "cache" - ]; - }; + cache.service = { + container_name = "nextcloud-cache"; + image = "redis:latest"; + restart = "unless-stopped"; + volumes = ["${config.custom.containers.directory}/nextcloud/cache:/data"]; + }; - cache.service = { - container_name = "nextcloud-cache"; - image = "redis:latest"; - restart = "unless-stopped"; - volumes = ["${config.custom.containers.directory}/nextcloud/cache:/data"]; - }; + db.service = { + container_name = "nextcloud-db"; + env_file = [config.age.secrets."${config.custom.profile}/nextcloud/db.env".path]; + image = "postgres:15"; + restart = "unless-stopped"; - db.service = { - container_name = "nextcloud-db"; - env_file = [config.age.secrets."${config.custom.profile}/nextcloud/db.env".path]; - image = "postgres:15"; - restart = "unless-stopped"; - - volumes = [ - "${config.custom.containers.directory}/nextcloud/db:/var/lib/postgresql/data" - ]; - }; + volumes = [ + "${config.custom.containers.directory}/nextcloud/db:/var/lib/postgresql/data" + ]; }; }; }; diff --git a/options/custom/containers/redlib.nix b/options/custom/containers/redlib.nix index be1f439..c858dac 100644 --- a/options/custom/containers/redlib.nix +++ b/options/custom/containers/redlib.nix @@ -12,23 +12,19 @@ in { #?? arion-redlib pull environment.shellAliases.arion-redlib = "sudo arion --prebuilt-file ${config.virtualisation.arion.projects.redlib.settings.out.dockerComposeYaml}"; - virtualisation.arion.projects.redlib = { - serviceName = "redlib"; + virtualisation.arion.projects.redlib.settings.services = { + redlib.service = { + container_name = "redlib"; + image = "quay.io/redlib/redlib:latest"; + ports = ["127.0.0.1:8888:8080"]; + restart = "unless-stopped"; - settings.services = { - redlib.service = { - container_name = "redlib"; - image = "quay.io/redlib/redlib:latest"; - ports = ["127.0.0.1:8888:8080"]; - restart = "unless-stopped"; - - environment = { - REDLIB_DEFAULT_HIDE_HLS_NOTIFICATION = "on"; - REDLIB_DEFAULT_SHOW_NSFW = "on"; - REDLIB_DEFAULT_THEME = "dracula"; - REDLIB_DEFAULT_USE_HLS = "on"; - REDLIB_DEFAULT_WIDE = "off"; - }; + environment = { + REDLIB_DEFAULT_HIDE_HLS_NOTIFICATION = "on"; + REDLIB_DEFAULT_SHOW_NSFW = "on"; + REDLIB_DEFAULT_THEME = "dracula"; + REDLIB_DEFAULT_USE_HLS = "on"; + REDLIB_DEFAULT_WIDE = "off"; }; }; }; diff --git a/options/custom/containers/searxng/default.nix b/options/custom/containers/searxng/default.nix index eae7edb..a9903b7 100644 --- a/options/custom/containers/searxng/default.nix +++ b/options/custom/containers/searxng/default.nix @@ -21,33 +21,29 @@ in { #?? arion-searxng pull environment.shellAliases.arion-searxng = "sudo arion --prebuilt-file ${config.virtualisation.arion.projects.searxng.settings.out.dockerComposeYaml}"; - virtualisation.arion.projects.searxng = { - serviceName = "searxng"; + virtualisation.arion.projects.searxng.settings.services = { + # https://github.com/searxng/searxng + # https://github.com/searxng/searxng-docker + searxng.service = { + container_name = "searxng"; + depends_on = ["cache"]; + env_file = [config.age.secrets."${config.custom.profile}/searxng/.env".path]; + image = "searxng/searxng:latest"; + ports = ["127.0.0.1:8000:8080"]; + restart = "unless-stopped"; - settings.services = { - # https://github.com/searxng/searxng - # https://github.com/searxng/searxng-docker - searxng.service = { - container_name = "searxng"; - depends_on = ["cache"]; - env_file = [config.age.secrets."${config.custom.profile}/searxng/.env".path]; - image = "searxng/searxng:latest"; - ports = ["127.0.0.1:8000:8080"]; - restart = "unless-stopped"; + volumes = [ + "${./limiter.toml}:/etc/searxng/limiter.toml" + "${./settings.yml}:/etc/searxng/settings.yml" + ]; + }; - volumes = [ - "${./limiter.toml}:/etc/searxng/limiter.toml" - "${./settings.yml}:/etc/searxng/settings.yml" - ]; - }; - - # https://github.com/valkey-io/valkey - cache.service = { - command = "valkey-server --save 60 1 --loglevel warning"; - container_name = "searxng-cache"; - image = "valkey/valkey:7-alpine"; - restart = "unless-stopped"; - }; + # https://github.com/valkey-io/valkey + cache.service = { + command = "valkey-server --save 60 1 --loglevel warning"; + container_name = "searxng-cache"; + image = "valkey/valkey:7-alpine"; + restart = "unless-stopped"; }; }; };