feat: more email, like dns
This commit is contained in:
parent
4d87bfe502
commit
bf71744b93
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
flake,
|
||||
...
|
||||
}: {
|
||||
age.secrets."mail@b12f.io-password" = {
|
||||
|
@ -9,8 +10,19 @@
|
|||
owner = "maddy";
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts = {
|
||||
"mail.b12f.io" = {
|
||||
extraConfig = ''
|
||||
respond "404 Not Found"
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
services.maddy = {
|
||||
enable = true;
|
||||
enable = false;
|
||||
|
||||
openFirewall = true;
|
||||
|
||||
primaryDomain = "b12f.io";
|
||||
|
||||
ensureAccounts = [
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
interface = "enp1s0";
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
|
||||
# Caddy reverse proxy for local services like cups
|
||||
services.caddy = {
|
||||
globalConfig = ''
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
bbeu = pkgs.stdenv.mkDerivation {
|
||||
name = "benjaminbaedorf.eu";
|
||||
src = builtins.fetchgit {
|
||||
url = "https://git.pub.solar/b12f/benjaminbaedorf.eu.git";
|
||||
sparseCheckout = [
|
||||
"fonts"
|
||||
"cows.jpg"
|
||||
"fonts.css"
|
||||
"index.html"
|
||||
"public-pgp-benjamin-baedorf.asc"
|
||||
];
|
||||
hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
|
||||
};
|
||||
};
|
||||
in {
|
||||
services.caddy.virtualHosts = {
|
||||
"benjaminbaedorf.eu" = {
|
||||
extraConfig = ''
|
||||
redir https://b12f.io{uri} temporary
|
||||
'';
|
||||
};
|
||||
|
||||
"b12f.io" = {
|
||||
extraConfig = ''
|
||||
handle {
|
||||
root * ${bbeu}
|
||||
try_files {path}.html {path}
|
||||
file_server
|
||||
}
|
||||
|
||||
handle_errors {
|
||||
respond "{http.error.status_code} {http.error.status_text}"
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -73,6 +73,8 @@
|
|||
forward-tls-upstream = "yes";
|
||||
}
|
||||
];
|
||||
|
||||
remote-control.control-enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
BIN
secrets/mail@b12f.io-password.age
Normal file
BIN
secrets/mail@b12f.io-password.age
Normal file
Binary file not shown.
Loading…
Reference in a new issue