2024-10-15 17:46:44 -04:00
|
|
|
{ pkgs, config, ... }:
|
2024-10-09 03:36:08 -04:00
|
|
|
{
|
2024-08-26 13:07:59 -04:00
|
|
|
services = {
|
|
|
|
nextcloud = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.nextcloud29;
|
2024-10-24 23:42:09 -04:00
|
|
|
hostName = "cloud.${config.domains.jim1}";
|
2024-08-26 13:07:59 -04:00
|
|
|
datadir = "/mnt/nextcloud";
|
|
|
|
https = true;
|
|
|
|
config = {
|
|
|
|
adminuser = "jimbo";
|
2024-09-11 00:59:16 -04:00
|
|
|
adminpassFile = "/mnt/nextcloud/password.txt";
|
2024-08-26 13:07:59 -04:00
|
|
|
};
|
|
|
|
settings = {
|
|
|
|
trusted_proxies = [ "127.0.0.1" ];
|
2024-10-24 23:42:09 -04:00
|
|
|
trusted_domains = [ "cloud.${config.domains.jim1}" ];
|
2024-08-26 13:07:59 -04:00
|
|
|
overwriteprotocol = "https";
|
2024-10-24 23:42:09 -04:00
|
|
|
mail_smtphost = "mx.${config.domains.jim1}";
|
|
|
|
mail_domain = "${config.domains.jim1}";
|
2024-08-26 13:07:59 -04:00
|
|
|
mail_from_address = "noreply";
|
|
|
|
mail_smtpauth = "true";
|
2024-10-24 23:42:09 -04:00
|
|
|
mail_smtpname = "noreply@${config.domains.jim1}";
|
2024-10-15 17:46:44 -04:00
|
|
|
mail_smtppassword = config.secrets.noreplyPassword;
|
2024-08-26 13:07:59 -04:00
|
|
|
mail_smtpmode = "smtp";
|
|
|
|
mail_smtpport = 587;
|
|
|
|
};
|
|
|
|
};
|
2024-10-07 11:42:34 -04:00
|
|
|
|
2024-10-24 23:42:09 -04:00
|
|
|
nginx.virtualHosts."cloud.${config.domains.jim1}" = {
|
2024-08-26 13:07:59 -04:00
|
|
|
enableACME = true;
|
|
|
|
addSSL = true;
|
|
|
|
locations."/" = {
|
|
|
|
proxyWebsockets = true;
|
|
|
|
extraConfig = "
|
|
|
|
location /.well-known/carddav {
|
|
|
|
return 301 $scheme://$host/remote.php/dav;
|
|
|
|
}
|
|
|
|
location /.well-known/caldav {
|
|
|
|
return 301 $scheme://$host/remote.php/dav;
|
|
|
|
}
|
|
|
|
";
|
|
|
|
};
|
2024-08-24 22:16:51 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|