From 625a77606a111c24dc36c405dcc76c51e162b991 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Thu, 27 Jun 2024 20:32:18 +0200 Subject: fix(peertube): Ensure that the nginx reverse proxy works --- modules/nixos/vhack/peertube/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/nixos/vhack/peertube/default.nix b/modules/nixos/vhack/peertube/default.nix index 193b628..df54336 100644 --- a/modules/nixos/vhack/peertube/default.nix +++ b/modules/nixos/vhack/peertube/default.nix @@ -1,7 +1,6 @@ { config, lib, - pkgs, ... }: let cfg = config.vhack.peertube; @@ -16,8 +15,8 @@ in { services.peertube = { enable = true; - localDomain = "peertube.vhack.eu"; configureNginx = true; + localDomain = "peertube.vhack.eu"; smtp = { createLocally = true; @@ -34,6 +33,13 @@ in { secrets.secretsFile = "${config.age.secrets.peertubeGeneral.path}"; }; + # The `configureNginx` option does not do this for some reason + # TODO(@bpeetz): Find out why <2024-06-27> + services.nginx.virtualHosts."${config.services.peertube.localDomain}" = { + enableACME = true; + forceSSL = true; + }; + age.secrets = { peertubeGeneral = { file = ./secrets/general.age; -- cgit 1.4.1