setup local telegram bot

This commit is contained in:
Dmitriy Kholkin 2024-06-30 13:53:24 +03:00
parent 15244723e0
commit 732b0ecfa0
Signed by: AtaraxiaDev
GPG Key ID: FD266B810DF48DF2
3 changed files with 26 additions and 1 deletions

View File

@ -81,7 +81,7 @@
services.openssh.settings.PermitRootLogin = lib.mkForce "without-password";
services.ratbagd.enable = true;
# Networking
networking.firewall.allowedTCPPorts = [ 8000 5900 52736 ];
networking.firewall.allowedTCPPorts = [ 8000 5900 52736 3456 ];
networking.nameservers = [ "192.168.0.1" ];
networking.defaultGateway = "192.168.0.1";
networking.bridges.br0.interfaces = [ "enp9s0" ];

View File

@ -10,6 +10,8 @@ in {
customProfiles.hardened
customRoles.hypervisor
customProfiles.tg-bot
customProfiles.acme
customProfiles.attic
customProfiles.atticd

View File

@ -0,0 +1,23 @@
{ config, ... }:
let
cert-fqdn = "tg.ataraxiadev.com";
in {
security.acme.certs = {
${cert-fqdn} = {
dnsResolver = "1.1.1.1:53";
dnsProvider = "cloudflare";
credentialFiles."CF_DNS_API_TOKEN_FILE" = config.sops.secrets.cf-dns-api.path;
};
};
services.nginx.virtualHosts = {
${cert-fqdn} = {
useACMEHost = cert-fqdn;
enableACME = false;
forceSSL = true;
locations."/" = {
proxyPass = "http://192.168.0.100:3456";
};
};
};
}