first commit
This commit is contained in:
32
hosts/AZ-CLD-1/services/ntfy.nix
Normal file
32
hosts/AZ-CLD-1/services/ntfy.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{config, ...}: let
|
||||
serviceName = "ntfy-sh";
|
||||
servicePort = config.m3ta.ports.get serviceName;
|
||||
in {
|
||||
services.${serviceName} = {
|
||||
enable = true;
|
||||
settings = {
|
||||
base-url = "https://ping.az-gruppe.com";
|
||||
listen-http = ":${toString servicePort}";
|
||||
auth-file = "/var/lib/ntfy-sh/user.db";
|
||||
auth-default-access = "deny-all";
|
||||
};
|
||||
};
|
||||
|
||||
# Traefik configuration
|
||||
services.traefik.dynamicConfigOptions.http = {
|
||||
services.${serviceName}.loadBalancer.servers = [
|
||||
{
|
||||
url = "http://localhost:${toString servicePort}/";
|
||||
}
|
||||
];
|
||||
|
||||
routers.${serviceName} = {
|
||||
rule = "Host(`ping.az-gruppe.com`)";
|
||||
tls = {
|
||||
certResolver = "ionos";
|
||||
};
|
||||
service = serviceName;
|
||||
entrypoints = "websecure";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user