modules/monitoring: add loki and promtail
This commit is contained in:
parent
92db38383e
commit
4b5b41b05a
20 changed files with 406 additions and 86 deletions
46
machines/biotite/services/gotosocial.nix
Normal file
46
machines/biotite/services/gotosocial.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
sops.secrets."gotosocial/oidc_client_secret" = {
|
||||
owner = "gotosocial";
|
||||
};
|
||||
|
||||
sops.templates."gotosocial.env" = {
|
||||
owner = "gotosocial";
|
||||
content = ''
|
||||
GTS_OIDC_CLIENT_SECRET=${config.sops.placeholder."gotosocial/oidc_client_secret"}
|
||||
'';
|
||||
};
|
||||
|
||||
services.gotosocial = {
|
||||
enable = true;
|
||||
settings = {
|
||||
log-level = "info";
|
||||
bind-address = "127.0.0.1";
|
||||
port = 19571;
|
||||
host = "gts.xiny.li";
|
||||
account-domain = "xiny.li";
|
||||
letsencrypt-enabled = false;
|
||||
instance-expose-public-timeline = true;
|
||||
oidc-enabled = true;
|
||||
oidc-idp-name = "Kanidm";
|
||||
oidc-issuer = "https://auth.xinyang.life/oauth2/openid/gotosocial";
|
||||
oidc-client-id = "gotosocial";
|
||||
oidc-link-existing = true;
|
||||
};
|
||||
environmentFile = config.sops.templates."gotosocial.env".path;
|
||||
};
|
||||
|
||||
services.caddy = {
|
||||
virtualHosts."https://gts.xiny.li".extraConfig = ''
|
||||
encode zstd gzip
|
||||
reverse_proxy * http://${config.services.gotosocial.settings.bind-address}:${toString config.services.gotosocial.settings.port} {
|
||||
flush_interval -1
|
||||
}
|
||||
'';
|
||||
virtualHosts."https://xiny.li".extraConfig = ''
|
||||
redir /.well-known/host-meta* https://gts.xiny.li{uri} permanent # host
|
||||
redir /.well-known/webfinger* https://gts.xiny.li{uri} permanent # host
|
||||
redir /.well-known/nodeinfo* https://gts.xiny.li{uri} permanent # host
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue