From d4b67a1fed34a1256de1930598a0f6be42e89df1 Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 13 May 2016 00:22:22 +0200 Subject: l 2 websites domsen: use msmtp as sendmail --- lass/2configs/websites/domsen.nix | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'lass/2configs/websites/domsen.nix') diff --git a/lass/2configs/websites/domsen.nix b/lass/2configs/websites/domsen.nix index a6fdad645..001e339a4 100644 --- a/lass/2configs/websites/domsen.nix +++ b/lass/2configs/websites/domsen.nix @@ -1,7 +1,10 @@ { config, pkgs, lib, ... }: let - inherit (config.krebs.lib) genid; + inherit (config.krebs.lib) + genid + readFile + ; inherit (import ../../4lib { inherit lib pkgs; }) manageCert manageCerts @@ -11,6 +14,16 @@ let serveOwncloud serveWordpress; + msmtprc = pkgs.writeText "msmtprc" '' + account prism + host localhost + account default: prism + ''; + + sendmail = pkgs.writeDash "msmtp" '' + exec ${pkgs.msmtp}/bin/msmtp --read-envelope-from -C ${msmtprc} "$@" + ''; + in { imports = [ ( ssl [ "reich-gebaeudereinigung.de" ]) @@ -66,13 +79,10 @@ in { createHome = true; }; - services.phpfpm.phpIni = pkgs.runCommand "php.ini" { - options = '' - extension=${pkgs.phpPackages.apcu}/lib/php/extensions/apcu.so - ''; - } '' - cat ${pkgs.php}/etc/php-recommended.ini > $out - echo "$options" >> $out + services.phpfpm.phpIni = pkgs.writeText "php.ini" '' + ${readFile "${pkgs.php}/etc/php-recommended.ini"} + extension=${pkgs.phpPackages.apcu}/lib/php/extensions/apcu.so + sendmail_path = ${sendmail} -t ''; } -- cgit v1.2.3