From 16e61fb814d0a2f0ce3ec0a5cfb7ef1cd8e8295d Mon Sep 17 00:00:00 2001 From: Ivan Reshetnikov Date: Mon, 11 Mar 2024 21:13:15 +0500 Subject: [PATCH] feat: update my website to v0.8.0, configure redirect from www --- nixos/programs/comfycamp.nix | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/nixos/programs/comfycamp.nix b/nixos/programs/comfycamp.nix index a4f4398..9ef924a 100644 --- a/nixos/programs/comfycamp.nix +++ b/nixos/programs/comfycamp.nix @@ -2,21 +2,23 @@ { virtualisation.oci-containers.containers.comfycamp = { autoStart = true; - image = "ghcr.io/ordinary-dev/comfycamp:v0.7.0"; + image = "ghcr.io/ordinary-dev/comfycamp:v0.8.0"; ports = ["55007:80"]; }; services.nginx.virtualHosts."[201:80ed:6eeb:aea4:cdc0:c836:2831:f2dd]" = { - locations = { - "/".proxyPass = "http://127.0.0.1:55007"; - }; + locations."/".proxyPass = "http://127.0.0.1:55007"; }; services.nginx.virtualHosts."comfycamp.space" = { useACMEHost = "comfycamp.space"; forceSSL = true; - locations = { - "/".proxyPass = "http://127.0.0.1:55007"; - }; + locations."/".proxyPass = "http://127.0.0.1:55007"; + }; + + services.nginx.virtualHosts."www.comfycamp.space" = { + useACMEHost = "comfycamp.space"; + forceSSL = true; + locations."/".return = "301 https://comfycamp.space$request_uri"; }; }