diff --git a/nixos/modules/services/web-apps/peertube.nix b/nixos/modules/services/web-apps/peertube.nix
index 170bc700f775..c01bfca173a1 100644
--- a/nixos/modules/services/web-apps/peertube.nix
+++ b/nixos/modules/services/web-apps/peertube.nix
@@ -161,6 +161,18 @@ in {
description = lib.mdDoc "Configure nginx as a reverse proxy for peertube.";
};
+ secrets = {
+ secretsFile = lib.mkOption {
+ type = lib.types.nullOr lib.types.path;
+ default = null;
+ example = "/run/secrets/peertube";
+ description = lib.mdDoc ''
+ Secrets to run PeerTube.
+ Generate one using `openssl rand -hex 32`
+ '';
+ };
+ };
+
database = {
createLocally = lib.mkOption {
type = lib.types.bool;
@@ -282,6 +294,11 @@ in {
prevent this.
'';
}
+ { assertion = cfg.secrets.secretsFile != null;
+ message = ''
+ needs to be set.
+ '';
+ }
{ assertion = !(cfg.redis.enableUnixSocket && (cfg.redis.host != null || cfg.redis.port != null));
message = ''
and redis network connection ( or ) enabled. Disable either of them.
@@ -418,6 +435,10 @@ in {
#!/bin/sh
umask 077
cat > /var/lib/peertube/config/local.yaml <