mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 05:36:59 +01:00
Move everyting to hel1 except emails
This commit is contained in:
parent
0d3f1b4afc
commit
f18644f8a1
18 changed files with 476 additions and 448 deletions
|
|
@ -1,6 +1,13 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let cfg = config.custom.services.roundcube;
|
||||
in {
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.services.roundcube;
|
||||
in
|
||||
{
|
||||
options.custom.services.roundcube = {
|
||||
enable = lib.mkEnableOption "roundcube";
|
||||
};
|
||||
|
|
@ -17,16 +24,17 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
# Required because roundcube uses psql: https://github.com/NixOS/nixpkgs/blob/46397778ef1f73414b03ed553a3368f0e7e33c2f/nixos/modules/services/mail/roundcube.nix#L247
|
||||
services.postgresql.package = pkgs.postgresql_15;
|
||||
|
||||
services.roundcube = {
|
||||
enable = true;
|
||||
plugins = [ "managesieve" ];
|
||||
dicts = with pkgs.aspellDicts; [ en fr de ];
|
||||
dicts = with pkgs.aspellDicts; [
|
||||
en
|
||||
fr
|
||||
de
|
||||
];
|
||||
hostName = "webmail.banditlair.com";
|
||||
database = {
|
||||
host = "10.0.1.11";
|
||||
host = "127.0.0.1";
|
||||
username = "roundcube";
|
||||
dbname = "roundcube";
|
||||
passwordFile = config.sops.secrets.pgPassFile.path;
|
||||
|
|
@ -35,10 +43,10 @@ in {
|
|||
extraConfig = ''
|
||||
# This override is required as a workaround for the nixpkgs config because we need a plain password instead of a pgpass file
|
||||
$password = file_get_contents('${config.sops.secrets.dbPassword.path}');
|
||||
$config['db_dsnw'] = 'pgsql://roundcube:' . $password . '@10.0.1.11/roundcube';
|
||||
$config['db_dsnw'] = 'pgsql://roundcube:' . $password . '@127.0.0.1/roundcube';
|
||||
|
||||
$config['default_host'] = 'ssl://mail.banditlair.com:993';
|
||||
$config['smtp_server'] = 'ssl://%h';
|
||||
$config['imap_host'] = 'ssl://mail.banditlair.com:993';
|
||||
$config['smtp_host'] = 'ssl://%h';
|
||||
$config['smtp_user'] = '%u';
|
||||
$config['smtp_pass'] = '%p';
|
||||
$config['identities_level'] = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue