add roundcube
This commit is contained in:
parent
618a6b544f
commit
a1c82ab6f3
4 changed files with 52 additions and 1 deletions
|
@ -111,7 +111,7 @@
|
||||||
nixpkgs-review
|
nixpkgs-review
|
||||||
just
|
just
|
||||||
hugo
|
hugo
|
||||||
ghidra-bin
|
ghidra
|
||||||
sequoia
|
sequoia
|
||||||
sccache
|
sccache
|
||||||
awscli2
|
awscli2
|
||||||
|
|
|
@ -205,4 +205,6 @@
|
||||||
};
|
};
|
||||||
virtualisation.oci-containers.backend = "podman";
|
virtualisation.oci-containers.backend = "podman";
|
||||||
environment.enableAllTerminfo = true;
|
environment.enableAllTerminfo = true;
|
||||||
|
|
||||||
|
my.roundcube.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,5 +3,6 @@
|
||||||
imports = [
|
imports = [
|
||||||
./backup.nix
|
./backup.nix
|
||||||
./caddy.nix
|
./caddy.nix
|
||||||
|
./roundcube.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
48
modules/roundcube.nix
Normal file
48
modules/roundcube.nix
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.my.roundcube;
|
||||||
|
fpm = config.services.phpfpm.pools.roundcube;
|
||||||
|
roundcube = config.services.roundcube;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.roundcube = {
|
||||||
|
enable = lib.mkEnableOption "roundcube webmail";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.roundcube = {
|
||||||
|
enable = true;
|
||||||
|
configureNginx = false;
|
||||||
|
package = pkgs.roundcube.withPlugins (p: with p; [
|
||||||
|
persistent_login
|
||||||
|
contextmenu
|
||||||
|
custom_from
|
||||||
|
thunderbird_labels
|
||||||
|
]);
|
||||||
|
plugins = [
|
||||||
|
"persistent_login"
|
||||||
|
"contextmenu"
|
||||||
|
"custom_from"
|
||||||
|
"thunderbird_labels"
|
||||||
|
];
|
||||||
|
dicts = with pkgs.aspellDicts; [ en ];
|
||||||
|
extraConfig = ''
|
||||||
|
$config['imap_host'] = "ssl://imap.migadu.com:993";
|
||||||
|
$config['smtp_host'] = "ssl://smtp.migadu.com:465";
|
||||||
|
$config['smtp_user'] = "%u";
|
||||||
|
$config['smtp_pass'] = "%p";
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
services.phpfpm.pools.roundcube.settings = lib.mapAttrs (name: lib.mkForce) {
|
||||||
|
"listen.owner" = "caddy";
|
||||||
|
"listen.group" = "caddy";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.caddy.virtualHosts."mail.cy7.sh".extraConfig = ''
|
||||||
|
import common
|
||||||
|
root ${roundcube.package}
|
||||||
|
php_fastcgi unix/${fpm.socket}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue