This commit is contained in:
2026-02-10 17:39:01 -05:00
parent f3e972b3a4
commit 0f1e249127
3 changed files with 39 additions and 0 deletions

View File

@@ -52,6 +52,8 @@
./services/ssh.nix ./services/ssh.nix
./services/syncthing.nix ./services/syncthing.nix
./services/ntfy.nix
]; ];
services.kmscon.enable = true; services.kmscon.enable = true;

View File

@@ -122,6 +122,7 @@
matrix_federation = 8448; matrix_federation = 8448;
coturn = 3478; coturn = 3478;
coturn_tls = 5349; coturn_tls = 5349;
ntfy = 2586;
}; };
https = { https = {
@@ -177,6 +178,10 @@
domain = "matrix.${https.domain}"; domain = "matrix.${https.domain}";
}; };
ntfy = {
domain = "ntfy.${https.domain}";
};
syncthing = { syncthing = {
dataDir = services_dir + "/syncthing"; dataDir = services_dir + "/syncthing";
signalBackupDir = "/${zpool_ssds}/bak/signal"; signalBackupDir = "/${zpool_ssds}/bak/signal";

32
services/ntfy.nix Normal file
View File

@@ -0,0 +1,32 @@
{
config,
service_configs,
lib,
...
}:
{
imports = [
(lib.serviceMountWithZpool "ntfy-sh" service_configs.zpool_ssds [
"/var/lib/ntfy-sh"
])
];
services.ntfy-sh = {
enable = true;
settings = {
base-url = "https://${service_configs.ntfy.domain}";
listen-http = "127.0.0.1:${builtins.toString service_configs.ports.ntfy}";
behind-proxy = true;
auth-default-access = "deny-all";
};
};
services.caddy.virtualHosts."${service_configs.ntfy.domain}".extraConfig = ''
reverse_proxy :${builtins.toString service_configs.ports.ntfy}
'';
systemd.tmpfiles.rules = [
"Z /var/lib/ntfy-sh 0700 ${config.services.ntfy-sh.user} ${config.services.ntfy-sh.group}"
];
}