feat(service): replace ntfy with maddy

feat(service): remove ntfy
This commit is contained in:
2026-04-05 08:21:59 +02:00
parent 5340d33e0f
commit 62f99a75dc
5 changed files with 62 additions and 15 deletions
+5
View File
@@ -10,8 +10,13 @@ in
enable = true; enable = true;
allowedTCPPorts = [ allowedTCPPorts = [
22 22
25
80 80
143
443 443
465
587
993
]; ];
allowedUDPPorts = [ allowedUDPPorts = [
80 80
+2 -2
View File
@@ -7,11 +7,11 @@
sopsFile = ../../secrets/bomba.sops.yaml; sopsFile = ../../secrets/bomba.sops.yaml;
}; };
ntfy_users = { ntfy_users = {
owner = "ntfy-sh"; # owner = "ntfy-sh";
sopsFile = ../../secrets/bomba.sops.yaml; sopsFile = ../../secrets/bomba.sops.yaml;
}; };
ntfy_access = { ntfy_access = {
owner = "ntfy-sh"; # owner = "ntfy-sh";
sopsFile = ../../secrets/bomba.sops.yaml; sopsFile = ../../secrets/bomba.sops.yaml;
}; };
}; };
+1
View File
@@ -5,6 +5,7 @@
./gitea.nix ./gitea.nix
./nextcloud.nix ./nextcloud.nix
./ntfy.nix ./ntfy.nix
./maddy.nix
./octoprint.nix ./octoprint.nix
./vaultwarden.nix ./vaultwarden.nix
]; ];
+41
View File
@@ -0,0 +1,41 @@
{
pkgs,
config,
options,
currentSystemEmail,
...
}:
{
services.maddy = {
enable = true;
primaryDomain = "patrickcanal.it";
ensureAccounts = [
"postmaster@patrickcanal.it"
"test@patrickcanal.it"
];
ensureCredentials = {
"postmaster@patrickcanal.it".passwordFile = "${pkgs.writeText "postmaster" "test"}";
"test@patrickcanal.it".passwordFile = "${pkgs.writeText "test" "test"}";
};
tls = {
loader = "file";
certificates = [
{
keyPath = "/etc/ssl/certs/privkey.pem";
certPath = "/etc/ssl/certs/fullchain.pem";
}
];
};
config =
builtins.replaceStrings
[
"imap tcp://0.0.0.0:143"
"submission tcp://0.0.0.0:587"
]
[
"imap tls://0.0.0.0:993 tcp://0.0.0.0:143"
"submission tls://0.0.0.0:465 tcp://0.0.0.0:587"
]
options.services.maddy.config.default;
};
}
+13 -13
View File
@@ -1,16 +1,16 @@
{ config, ... }: { config, ... }:
{ {
services.ntfy-sh = { # services.ntfy-sh = {
enable = true; # enable = false;
environmentFile = config.sops.templates."ntfy.env".path; # environmentFile = config.sops.templates."ntfy.env".path;
settings = { # settings = {
listen-http = ":8005"; # listen-http = ":8005";
base-url = "https://ntfy.patrickcanal.it"; # base-url = "https://ntfy.patrickcanal.it";
smtp-server-listen = ":25"; # smtp-server-listen = ":25";
smtp-server-domain = "patrickcanal.it"; # smtp-server-domain = "patrickcanal.it";
behind-proxy = true; # behind-proxy = true;
enable-login = true; # enable-login = true;
require-login = true; # require-login = true;
}; # };
}; # };
} }