diff options
Diffstat (limited to '')
| -rw-r--r-- | modules/vhack/pe/peertube/module.nix (renamed from modules/by-name/pe/peertube/module.nix) | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/modules/by-name/pe/peertube/module.nix b/modules/vhack/pe/peertube/module.nix index 29d1d07..e65e0b5 100644 --- a/modules/by-name/pe/peertube/module.nix +++ b/modules/vhack/pe/peertube/module.nix @@ -1,7 +1,6 @@ { config, lib, - pkgs, ... }: let cfg = config.vhack.peertube; @@ -10,6 +9,14 @@ in { enable = lib.mkEnableOption '' the peertube video platform. ''; + peertubeGeneral = lib.mkOption { + type = lib.types.path; + description = "The age encrypted general secret file passed to agenix"; + }; + smtpPasswordFile = lib.mkOption { + type = lib.types.path; + description = "The age encrypted smtp password file passed to agenix"; + }; }; config = lib.mkIf cfg.enable { @@ -22,7 +29,7 @@ in { listenWeb = 443; smtp = { - createLocally = true; + createLocally = false; passwordFile = "${config.age.secrets.peertubeSmtp.path}"; }; database = { @@ -66,10 +73,8 @@ in { smtp = let emailAddress = "peertube@vhack.eu"; in { - sendmail = "${pkgs.postfix}/bin/sendmail"; - - transport = "sendmail"; - hostname = "server1.vhack.eu"; + transport = "smtp"; + hostname = "mail.foss-syndicate.org"; port = 587; username = emailAddress; tls = true; @@ -88,20 +93,20 @@ in { age.secrets = { peertubeGeneral = { - file = ./secrets/general.age; + file = cfg.peertubeGeneral; mode = "700"; owner = "peertube"; group = "peertube"; }; peertubeSmtp = { - file = ./secrets/smtp.age; + file = cfg.smtpPasswordFile; mode = "700"; owner = "peertube"; group = "peertube"; }; }; - environment.persistence."/srv".directories = [ + vhack.persist.directories = [ { directory = "/var/lib/peertube"; user = "peertube"; @@ -109,5 +114,11 @@ in { mode = "0700"; } ]; + users = { + users.peertube.uid = config.vhack.constants.ids.uids.peertube; + groups.peertube.gid = config.vhack.constants.ids.gids.peertube; + users.redis-peertube.uid = config.vhack.constants.ids.uids.redis-peertube; + groups.redis-peertube.gid = config.vhack.constants.ids.gids.redis-peertube; + }; }; } |
