summary refs log tree commit diff stats
path: root/modules
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-06-27 20:32:18 +0200
committerSilas Schöffel <sils@sils.li>2024-06-28 20:53:03 +0200
commit625a77606a111c24dc36c405dcc76c51e162b991 (patch)
tree6bded20277c4f148a0c32647a0b143f23943a194 /modules
parentfeat(flake): Add `git-bug` (diff)
downloadnixos-server-625a77606a111c24dc36c405dcc76c51e162b991.tar.gz
nixos-server-625a77606a111c24dc36c405dcc76c51e162b991.zip
fix(peertube): Ensure that the nginx reverse proxy works
Diffstat (limited to 'modules')
-rw-r--r--modules/nixos/vhack/peertube/default.nix10
1 files 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;