{ config, pkgs, lib, ... }: { age.secrets = { YfDrVBDJcVoYNZeJ = { file = ../secrets/cache/YfDrVBDJcVoYNZeJ; owner = "roundcube"; }; LtnxWKwZdDIxAKzp = { file = ../secrets/cache/LtnxWKwZdDIxAKzp; owner = "roundcube"; }; }; services.roundcube = { enable = true; hostName = "${config.module.roundcube.subdomain}.${config.module.domain}"; plugins = [ "multiple_accounts" ]; configureNginx = false; extraConfig = '' // Concatenate the protocol string with the file contents in PHP $config['default_host'] = 'ssl://' . trim(file_get_contents('${config.age.secrets.LtnxWKwZdDIxAKzp.path}')); $config['default_port'] = 993; $config['smtp_server'] = 'tls://' . trim(file_get_contents('${config.age.secrets.YfDrVBDJcVoYNZeJ.path}')); $config['smtp_port'] = 465; $config['smtp_user'] = '%u'; $config['smtp_pass'] = '%p'; ''; }; users.groups.roundcube.members = [ "nginx" "phpfpm" ]; }