feat: change domain
This commit is contained in:
parent
01efc1f257
commit
1749a74e76
4 changed files with 23 additions and 30 deletions
|
|
@ -1,14 +1,7 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
{config, ...}: {
|
||||
services.ddns-updater = {
|
||||
enable = true;
|
||||
package = inputs.stable.legacyPackages.${pkgs.system}.ddns-updater;
|
||||
environment = {
|
||||
# LOG_LEVEL = "debug";
|
||||
CONFIG_FILEPATH = config.clan.core.vars.generators.ddns-updater-conf.files."config.json".path;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@
|
|||
];
|
||||
mailserver = {
|
||||
enable = true;
|
||||
fqdn = "mail.moritz.foo";
|
||||
domains = ["moritz.foo"];
|
||||
fqdn = "mail.moritz.place";
|
||||
domains = ["moritz.place"];
|
||||
|
||||
fullTextSearch = {
|
||||
enable = true;
|
||||
|
|
@ -22,16 +22,16 @@
|
|||
};
|
||||
|
||||
loginAccounts = {
|
||||
"main@moritz.foo" = {
|
||||
"main@moritz.place" = {
|
||||
hashedPasswordFile = config.clan.core.vars.generators.mail-server.files.main-password-hash.path;
|
||||
aliases = ["@moritz.foo"];
|
||||
aliases = ["@moritz.place"];
|
||||
};
|
||||
};
|
||||
|
||||
# Use Let's Encrypt certificates. Note that this needs to set up a stripped
|
||||
# down nginx and opens port 80.
|
||||
certificateScheme = "acme";
|
||||
acmeCertificateName = "any.moritz.foo";
|
||||
acmeCertificateName = "any.moritz.place";
|
||||
};
|
||||
|
||||
clan.core.vars.generators.mail-server = {
|
||||
|
|
@ -59,7 +59,7 @@
|
|||
|
||||
services.roundcube = {
|
||||
enable = true;
|
||||
hostName = "webmail.moritz.foo";
|
||||
hostName = "webmail.moritz.place";
|
||||
dicts = with pkgs.aspellDicts; [en de];
|
||||
extraConfig = ''
|
||||
# starttls needed for authentication, so the fqdn required to match
|
||||
|
|
@ -69,8 +69,8 @@
|
|||
$config['smtp_pass'] = "%p";
|
||||
'';
|
||||
};
|
||||
services.nginx.virtualHosts."webmail.moritz.foo".enableACME = false;
|
||||
services.nginx.virtualHosts."webmail.moritz.foo".useACMEHost = "any.moritz.foo";
|
||||
services.nginx.virtualHosts."webmail.moritz.place".enableACME = false;
|
||||
services.nginx.virtualHosts."webmail.moritz.place".useACMEHost = "any.moritz.place";
|
||||
|
||||
services.borgbackup.jobs = {
|
||||
mailDirectory = {
|
||||
|
|
|
|||
|
|
@ -59,9 +59,9 @@
|
|||
proxyPass = "http://192.168.0.6";
|
||||
};
|
||||
};
|
||||
"www.moritz.foo" = {
|
||||
"www.moritz.place" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "any.moritz.foo";
|
||||
useACMEHost = "any.moritz.place";
|
||||
locations."/" = {
|
||||
extraConfig = ''
|
||||
add_header Content-Type text/html;
|
||||
|
|
@ -69,17 +69,17 @@
|
|||
return = "200 '<html><body>Hello World</body></html>'";
|
||||
};
|
||||
};
|
||||
"moritz.foo" = {
|
||||
"moritz.place" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "moritz.foo";
|
||||
useACMEHost = "moritz.place";
|
||||
locations."/" = {
|
||||
return = "301 https://www.moritz.foo";
|
||||
return = "301 https://www.moritz.place";
|
||||
};
|
||||
};
|
||||
"_" = {
|
||||
forceSSL = true;
|
||||
default = true;
|
||||
useACMEHost = "any.moritz.foo";
|
||||
useACMEHost = "any.moritz.place";
|
||||
locations."/" = {
|
||||
return = "404 'Not found!'";
|
||||
};
|
||||
|
|
@ -96,7 +96,7 @@
|
|||
|
||||
map $ssl_preread_server_name $name {
|
||||
hostnames;
|
||||
.moritz.foo self;
|
||||
.moritz.place self;
|
||||
.moritzboeh.me diskstation;
|
||||
}
|
||||
|
||||
|
|
@ -112,13 +112,13 @@
|
|||
acceptTerms = true;
|
||||
defaults.email = "acme@moritzboeh.me";
|
||||
defaults.dnsResolver = "1.1.1.1:53";
|
||||
certs."moritz.foo" = {
|
||||
certs."moritz.place" = {
|
||||
dnsProvider = "cloudflare";
|
||||
group = "nginx";
|
||||
environmentFile = config.clan.core.vars.generators.acme.files.vars.path;
|
||||
};
|
||||
certs."any.moritz.foo" = {
|
||||
domain = "*.moritz.foo";
|
||||
certs."any.moritz.place" = {
|
||||
domain = "*.moritz.place";
|
||||
dnsProvider = "cloudflare";
|
||||
group = "nginx";
|
||||
environmentFile = config.clan.core.vars.generators.acme.files.vars.path;
|
||||
|
|
|
|||
|
|
@ -47,13 +47,13 @@ in {
|
|||
imapnotify.enable = true;
|
||||
imapnotify.boxes = ["Inbox"];
|
||||
imapnotify.onNotify = "${lib.getExe' pkgs.systemd "systemctl"} start --user mbsync.service";
|
||||
address = "main@moritz.foo";
|
||||
userName = "main@moritz.foo";
|
||||
address = "main@moritz.place";
|
||||
userName = "main@moritz.place";
|
||||
aerc.enable = true;
|
||||
# gpg.signByDefault = true;
|
||||
# gpg.key = "0xE4F362A3F5C338A0";
|
||||
imap.host = "mail.moritz.foo";
|
||||
smtp.host = "mail.moritz.foo";
|
||||
imap.host = "mail.moritz.place";
|
||||
smtp.host = "mail.moritz.place";
|
||||
realName = "Moritz Böhme";
|
||||
mbsync.enable = true;
|
||||
mbsync.create = "both";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue