hosts/kazuki: ntfy init
This commit is contained in:
parent
57113b48dc
commit
d64c02e3da
2 changed files with 47 additions and 0 deletions
|
@ -14,6 +14,7 @@
|
|||
./vault.nix
|
||||
./storage.nix
|
||||
./attic.nix
|
||||
./ntfy.nix
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = "aarch64-linux";
|
||||
|
|
46
hosts/kazuki/ntfy.nix
Normal file
46
hosts/kazuki/ntfy.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{config, ...}: {
|
||||
age.secrets.nrab-lol-cf = {
|
||||
file = ../../secrets/nrab-lol-cf.age;
|
||||
owner = config.services.nginx.user;
|
||||
};
|
||||
|
||||
services.ntfy-sh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
base-url = "ntfy.nrab.lol";
|
||||
listen-http = "127.0.0.1:9800";
|
||||
behind-proxy = true;
|
||||
upstream-base-url = "https://ntfy.sh";
|
||||
auth-default-access = "deny-all";
|
||||
};
|
||||
};
|
||||
|
||||
users.users.nginx.extraGroups = ["acme"];
|
||||
networking.firewall.allowedTCPPorts = [80 443];
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedTlsSettings = true;
|
||||
virtualHosts."ntfy.nrab.lol" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
acmeRoot = null;
|
||||
locations."/" = {
|
||||
proxyPass = "http://ntfy";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
|
||||
upstreams.ntfy.servers = {
|
||||
"localhost:9800" = {};
|
||||
};
|
||||
};
|
||||
|
||||
security.acme.certs."ntfy.nrab.lol" = {
|
||||
dnsProvider = "cloudflare";
|
||||
credentialsFile = config.age.secrets.nrab-lol-cf.path;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue