biotite: move all services to biotite except kanidm
This commit is contained in:
parent
7bc5db676d
commit
756357552a
13 changed files with 78 additions and 52 deletions
29
machines/thorite/ntfy.nix
Normal file
29
machines/thorite/ntfy.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ config, ... }:
|
||||
let
|
||||
inherit (config.my-lib.settings) ntfyUrl;
|
||||
in
|
||||
{
|
||||
|
||||
services.ntfy-sh = {
|
||||
enable = true;
|
||||
group = "caddy";
|
||||
settings = {
|
||||
listen-unix = "/var/run/ntfy-sh/ntfy.sock";
|
||||
listen-unix-mode = 432; # octal 0660
|
||||
base-url = ntfyUrl;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.ntfy-sh.serviceConfig.RuntimeDirectory = "ntfy-sh";
|
||||
|
||||
services.caddy.virtualHosts.${ntfyUrl}.extraConfig = ''
|
||||
reverse_proxy unix/${config.services.ntfy-sh.settings.listen-unix}
|
||||
@httpget {
|
||||
protocol http
|
||||
method GET
|
||||
path_regexp ^/([-_a-z0-9]{0,64}$|docs/|static/)
|
||||
}
|
||||
redir @httpget https://{host}{uri}
|
||||
'';
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue