aboutsummaryrefslogtreecommitdiff
path: root/modules/private/websites/tools/mail
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-12-12 00:24:23 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-12-20 04:12:27 +0100
commitab8f306d7c2c49b8116e1af7b355ed2384617ed9 (patch)
treed1061ec0436fd096de2332a892eb984c63cb125e /modules/private/websites/tools/mail
parent4227853a03923e04daf3dd511a4b5a1ab5d527e7 (diff)
downloadNix-ab8f306d7c2c49b8116e1af7b355ed2384617ed9.tar.gz
Nix-ab8f306d7c2c49b8116e1af7b355ed2384617ed9.tar.zst
Nix-ab8f306d7c2c49b8116e1af7b355ed2384617ed9.zip
Add specification for the private config file as a module.
Diffstat (limited to 'modules/private/websites/tools/mail')
-rw-r--r--modules/private/websites/tools/mail/default.nix4
-rw-r--r--modules/private/websites/tools/mail/mta-sts.nix4
-rw-r--r--modules/private/websites/tools/mail/roundcubemail.nix7
3 files changed, 9 insertions, 6 deletions
diff --git a/modules/private/websites/tools/mail/default.nix b/modules/private/websites/tools/mail/default.nix
index 218c3a5..6342694 100644
--- a/modules/private/websites/tools/mail/default.nix
+++ b/modules/private/websites/tools/mail/default.nix
@@ -1,8 +1,8 @@
1{ lib, pkgs, config, myconfig, ... }: 1{ lib, pkgs, config, ... }:
2let 2let
3 roundcubemail = pkgs.callPackage ./roundcubemail.nix { 3 roundcubemail = pkgs.callPackage ./roundcubemail.nix {
4 inherit (pkgs.webapps) roundcubemail roundcubemail-plugins roundcubemail-skins; 4 inherit (pkgs.webapps) roundcubemail roundcubemail-plugins roundcubemail-skins;
5 env = myconfig.env.tools.roundcubemail; 5 env = config.myEnv.tools.roundcubemail;
6 }; 6 };
7 rainloop = pkgs.callPackage ./rainloop.nix {}; 7 rainloop = pkgs.callPackage ./rainloop.nix {};
8 cfg = config.myServices.websites.tools.email; 8 cfg = config.myServices.websites.tools.email;
diff --git a/modules/private/websites/tools/mail/mta-sts.nix b/modules/private/websites/tools/mail/mta-sts.nix
index d443f55..a401b41 100644
--- a/modules/private/websites/tools/mail/mta-sts.nix
+++ b/modules/private/websites/tools/mail/mta-sts.nix
@@ -1,4 +1,4 @@
1{ lib, pkgs, config, myconfig, ... }: 1{ lib, pkgs, config, ... }:
2let 2let
3 domains = (lib.remove null (lib.flatten (map 3 domains = (lib.remove null (lib.flatten (map
4 (zone: map 4 (zone: map
@@ -11,7 +11,7 @@ let
11 ) 11 )
12 (zone.withEmail or []) 12 (zone.withEmail or [])
13 ) 13 )
14 myconfig.env.dns.masterZones 14 config.myEnv.dns.masterZones
15 ))); 15 )));
16 # FIXME: increase the id number in modules/private/dns.nix when this 16 # FIXME: increase the id number in modules/private/dns.nix when this
17 # file change (date -u +'%Y%m%d%H%M%S'Z) 17 # file change (date -u +'%Y%m%d%H%M%S'Z)
diff --git a/modules/private/websites/tools/mail/roundcubemail.nix b/modules/private/websites/tools/mail/roundcubemail.nix
index 8bb60d6..35de312 100644
--- a/modules/private/websites/tools/mail/roundcubemail.nix
+++ b/modules/private/websites/tools/mail/roundcubemail.nix
@@ -14,9 +14,12 @@ rec {
14 user = apache.user; 14 user = apache.user;
15 group = apache.group; 15 group = apache.group;
16 permissions = "0400"; 16 permissions = "0400";
17 text = '' 17 text =
18 let
19 psql_url = with env.postgresql; "pgsql://${user}:${password}@unix(${socket}:${port})/${database}";
20 in ''
18 <?php 21 <?php
19 $config['db_dsnw'] = '${env.psql_url}'; 22 $config['db_dsnw'] = '${psql_url}';
20 $config['default_host'] = 'ssl://imap.immae.eu'; 23 $config['default_host'] = 'ssl://imap.immae.eu';
21 $config['username_domain'] = array( 24 $config['username_domain'] = array(
22 "imap.immae.eu" => "mail.immae.eu" 25 "imap.immae.eu" => "mail.immae.eu"