From 567630adeb82eadfa5bcf0b19afd16173a470a97 Mon Sep 17 00:00:00 2001 From: Silas Schöffel Date: Sat, 25 Jan 2025 21:51:33 +0100 Subject: feat(peertube): make secrets configurable --- modules/by-name/pe/peertube/module.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'modules/by-name/pe/peertube/module.nix') diff --git a/modules/by-name/pe/peertube/module.nix b/modules/by-name/pe/peertube/module.nix index a37ff03..e65e0b5 100644 --- a/modules/by-name/pe/peertube/module.nix +++ b/modules/by-name/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 { @@ -86,13 +93,13 @@ 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"; -- cgit 1.4.1