feat: change domain

This commit is contained in:
Moritz Böhme 2025-05-15 18:17:56 +02:00
parent 01efc1f257
commit 1749a74e76
No known key found for this signature in database
GPG key ID: 970C6E89EB0547A9
4 changed files with 23 additions and 30 deletions

View file

@ -1,14 +1,7 @@
{ {config, ...}: {
config,
pkgs,
inputs,
...
}: {
services.ddns-updater = { services.ddns-updater = {
enable = true; enable = true;
package = inputs.stable.legacyPackages.${pkgs.system}.ddns-updater;
environment = { environment = {
# LOG_LEVEL = "debug";
CONFIG_FILEPATH = config.clan.core.vars.generators.ddns-updater-conf.files."config.json".path; CONFIG_FILEPATH = config.clan.core.vars.generators.ddns-updater-conf.files."config.json".path;
}; };
}; };

View file

@ -10,8 +10,8 @@
]; ];
mailserver = { mailserver = {
enable = true; enable = true;
fqdn = "mail.moritz.foo"; fqdn = "mail.moritz.place";
domains = ["moritz.foo"]; domains = ["moritz.place"];
fullTextSearch = { fullTextSearch = {
enable = true; enable = true;
@ -22,16 +22,16 @@
}; };
loginAccounts = { loginAccounts = {
"main@moritz.foo" = { "main@moritz.place" = {
hashedPasswordFile = config.clan.core.vars.generators.mail-server.files.main-password-hash.path; 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 # Use Let's Encrypt certificates. Note that this needs to set up a stripped
# down nginx and opens port 80. # down nginx and opens port 80.
certificateScheme = "acme"; certificateScheme = "acme";
acmeCertificateName = "any.moritz.foo"; acmeCertificateName = "any.moritz.place";
}; };
clan.core.vars.generators.mail-server = { clan.core.vars.generators.mail-server = {
@ -59,7 +59,7 @@
services.roundcube = { services.roundcube = {
enable = true; enable = true;
hostName = "webmail.moritz.foo"; hostName = "webmail.moritz.place";
dicts = with pkgs.aspellDicts; [en de]; dicts = with pkgs.aspellDicts; [en de];
extraConfig = '' extraConfig = ''
# starttls needed for authentication, so the fqdn required to match # starttls needed for authentication, so the fqdn required to match
@ -69,8 +69,8 @@
$config['smtp_pass'] = "%p"; $config['smtp_pass'] = "%p";
''; '';
}; };
services.nginx.virtualHosts."webmail.moritz.foo".enableACME = false; services.nginx.virtualHosts."webmail.moritz.place".enableACME = false;
services.nginx.virtualHosts."webmail.moritz.foo".useACMEHost = "any.moritz.foo"; services.nginx.virtualHosts."webmail.moritz.place".useACMEHost = "any.moritz.place";
services.borgbackup.jobs = { services.borgbackup.jobs = {
mailDirectory = { mailDirectory = {

View file

@ -59,9 +59,9 @@
proxyPass = "http://192.168.0.6"; proxyPass = "http://192.168.0.6";
}; };
}; };
"www.moritz.foo" = { "www.moritz.place" = {
forceSSL = true; forceSSL = true;
useACMEHost = "any.moritz.foo"; useACMEHost = "any.moritz.place";
locations."/" = { locations."/" = {
extraConfig = '' extraConfig = ''
add_header Content-Type text/html; add_header Content-Type text/html;
@ -69,17 +69,17 @@
return = "200 '<html><body>Hello World</body></html>'"; return = "200 '<html><body>Hello World</body></html>'";
}; };
}; };
"moritz.foo" = { "moritz.place" = {
forceSSL = true; forceSSL = true;
useACMEHost = "moritz.foo"; useACMEHost = "moritz.place";
locations."/" = { locations."/" = {
return = "301 https://www.moritz.foo"; return = "301 https://www.moritz.place";
}; };
}; };
"_" = { "_" = {
forceSSL = true; forceSSL = true;
default = true; default = true;
useACMEHost = "any.moritz.foo"; useACMEHost = "any.moritz.place";
locations."/" = { locations."/" = {
return = "404 'Not found!'"; return = "404 'Not found!'";
}; };
@ -96,7 +96,7 @@
map $ssl_preread_server_name $name { map $ssl_preread_server_name $name {
hostnames; hostnames;
.moritz.foo self; .moritz.place self;
.moritzboeh.me diskstation; .moritzboeh.me diskstation;
} }
@ -112,13 +112,13 @@
acceptTerms = true; acceptTerms = true;
defaults.email = "acme@moritzboeh.me"; defaults.email = "acme@moritzboeh.me";
defaults.dnsResolver = "1.1.1.1:53"; defaults.dnsResolver = "1.1.1.1:53";
certs."moritz.foo" = { certs."moritz.place" = {
dnsProvider = "cloudflare"; dnsProvider = "cloudflare";
group = "nginx"; group = "nginx";
environmentFile = config.clan.core.vars.generators.acme.files.vars.path; environmentFile = config.clan.core.vars.generators.acme.files.vars.path;
}; };
certs."any.moritz.foo" = { certs."any.moritz.place" = {
domain = "*.moritz.foo"; domain = "*.moritz.place";
dnsProvider = "cloudflare"; dnsProvider = "cloudflare";
group = "nginx"; group = "nginx";
environmentFile = config.clan.core.vars.generators.acme.files.vars.path; environmentFile = config.clan.core.vars.generators.acme.files.vars.path;

View file

@ -47,13 +47,13 @@ in {
imapnotify.enable = true; imapnotify.enable = true;
imapnotify.boxes = ["Inbox"]; imapnotify.boxes = ["Inbox"];
imapnotify.onNotify = "${lib.getExe' pkgs.systemd "systemctl"} start --user mbsync.service"; imapnotify.onNotify = "${lib.getExe' pkgs.systemd "systemctl"} start --user mbsync.service";
address = "main@moritz.foo"; address = "main@moritz.place";
userName = "main@moritz.foo"; userName = "main@moritz.place";
aerc.enable = true; aerc.enable = true;
# gpg.signByDefault = true; # gpg.signByDefault = true;
# gpg.key = "0xE4F362A3F5C338A0"; # gpg.key = "0xE4F362A3F5C338A0";
imap.host = "mail.moritz.foo"; imap.host = "mail.moritz.place";
smtp.host = "mail.moritz.foo"; smtp.host = "mail.moritz.place";
realName = "Moritz Böhme"; realName = "Moritz Böhme";
mbsync.enable = true; mbsync.enable = true;
mbsync.create = "both"; mbsync.create = "both";