diff --git a/hosts/faunus-ater.nix b/hosts/faunus-ater.nix index 3e49eb9..0c4953f 100644 --- a/hosts/faunus-ater.nix +++ b/hosts/faunus-ater.nix @@ -297,7 +297,8 @@ in { # === Photoprism === services.photoprism = { enable = true; - port = 2342; + port = config.state.services.foto.port; + address = "0.0.0.0"; storagePath = "/data/dirty/photoprism/storage"; originalsPath = "/data/dirty/photoprism/originals"; importPath = "/data/dirty/photoprism/import"; @@ -307,7 +308,7 @@ in { PHOTOPRISM_SESSION_TIMEOUT = "31536000"; PHOTOPRISM_UPLOAD_NSFW = "true"; PHOTOPRISM_DETECT_NSFW = "true"; - PHOTOPRISM_SITE_URL = "https://foto.home"; + PHOTOPRISM_SITE_URL = "https://foto.tammena.me"; PHOTOPRISM_SITE_TITLE = "PhotoPrism"; PHOTOPRISM_SITE_CAPTION = "All the pictures!"; PHOTOPRISM_SITE_DESCRIPTION = ""; @@ -321,7 +322,7 @@ in { systemd.services.photoprism.serviceConfig.SystemCallFilter = lib.mkForce []; services.nginx.virtualHosts."foto.home" = mkVirtHost "foto-home" { locations."/" = { - proxyPass = "http://localhost:${builtins.toString config.services.photoprism.port}"; + proxyPass = "http://${config.services.photoprism.address}:${builtins.toString config.services.photoprism.port}"; proxyWebsockets = true; }; extraConfig = '' diff --git a/hosts/granodomus-lima.nix b/hosts/granodomus-lima.nix index 0e17afa..b279eb6 100644 --- a/hosts/granodomus-lima.nix +++ b/hosts/granodomus-lima.nix @@ -52,7 +52,7 @@ in { name = "${name}.tammena.me"; value = mkVirtHost { locations."/" = { - proxyPass = "http://${config.host}:${builtins.toString config.port}"; + proxyPass = "http://${config.host}.taila034c.ts.net:${builtins.toString config.port}"; proxyWebsockets = true; }; }; @@ -72,16 +72,6 @@ in { } ''; - sops.secrets = - lib.mapAttrs' (name: _: { - name = "certificate-key-${name}-tammena-me"; - value = { - owner = "nginx"; - mode = "0400"; - }; - }) - (builtins.import ../state.nix).services; - services.qemuGuest.enable = true; services.bind = { diff --git a/state.nix b/state.nix index 6c21c37..dd3457e 100644 --- a/state.nix +++ b/state.nix @@ -47,5 +47,10 @@ port = 10224; external = true; }; + foto = { + host = "faunus-ater"; + port = 2342; + external = true; + }; }; }