From ed88c499c3b01c8647ff4f5679c07216bd63a224 Mon Sep 17 00:00:00 2001 From: Victor Date: Sun, 15 May 2022 10:54:26 +0200 Subject: [PATCH] hedgedoc: configure minio properly --- nixos/hosts/hedgedoc/configuration.nix | 9 ++++++--- nixos/hosts/nginx/configuration.nix | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/nixos/hosts/hedgedoc/configuration.nix b/nixos/hosts/hedgedoc/configuration.nix index 82f398a..66fec37 100644 --- a/nixos/hosts/hedgedoc/configuration.nix +++ b/nixos/hosts/hedgedoc/configuration.nix @@ -35,7 +35,6 @@ in enable = true; package = pkgs.postgresql_13; ensureDatabases = [ db_name ]; - # authentication = "host ${db_name} ${db_user} 127.0.0.1/32 trust"; ensureUsers = [ { name = db_user; @@ -59,6 +58,9 @@ in "hedgedoc" ]; allowEmailRegister = false; + allowAnonymousEdits = true; + allowFreeURL = true; + requireFreeURLAuthentication = true; imageUploadType = "minio"; db = { dialect = "postgres"; @@ -68,8 +70,9 @@ in }; s3bucket = "hedgedoc"; minio = { - secure = false; - endPoint = "minio.olympus"; + secure = true; + endPoint = "o.0x76.dev"; + port = 443; accessKey = "$MINIO_ACCESS_KEY"; secretKey = "$MINIO_SECRET_KEY"; }; diff --git a/nixos/hosts/nginx/configuration.nix b/nixos/hosts/nginx/configuration.nix index f96fa16..5115371 100644 --- a/nixos/hosts/nginx/configuration.nix +++ b/nixos/hosts/nginx/configuration.nix @@ -30,6 +30,7 @@ in enable = true; recommendedProxySettings = true; recommendedTlsSettings = true; + recommendedOptimisation = true; package = pkgs.nginxMainline.override { modules = with pkgs.nginxModules; [ brotli ]; @@ -40,6 +41,7 @@ in virtualHosts."zookeeper-dev.0x76.dev" = proxy "http://eevee.olympus:8085/"; virtualHosts."md.0x76.dev" = proxy "http://hedgedoc.olympus:3000/"; virtualHosts."git.0x76.dev" = proxy "http://gitea.olympus:3000"; + virtualHosts."o.0x76.dev" = proxy "http://minio.olympus:9000"; # Kubernetes endpoints virtualHosts."0x76.dev" = k8s_proxy;