mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-04-29 18:08:29 +02:00
configure trucksimulatorbot
This commit is contained in:
parent
747b917732
commit
1c023fa7af
6 changed files with 71 additions and 33 deletions
|
@ -1,10 +1,28 @@
|
|||
{ config, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
domain = "trucksimulatorbot.rfive.de";
|
||||
in
|
||||
{
|
||||
services.trucksimulatorbot = {
|
||||
images.enable = true;
|
||||
enable = true;
|
||||
listenPort = 9033;
|
||||
discord = {
|
||||
clientId = "831052837353816066";
|
||||
publicKey = "faa7004a2a5096702f96f3ebeb45c7e8272c119b72c1a0894abc4d76d8cc8bad";
|
||||
};
|
||||
};
|
||||
services.mysql = {
|
||||
enable = true;
|
||||
package = pkgs.mariadb;
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "trucksimulator";
|
||||
ensurePermissions = {
|
||||
"trucksimulator.*" = "ALL PRIVILEGES";
|
||||
};
|
||||
}
|
||||
];
|
||||
ensureDatabases = [ "trucksimulator" ];
|
||||
};
|
||||
services.nginx.virtualHosts = {
|
||||
"images.${domain}" = {
|
||||
|
@ -19,9 +37,8 @@ in
|
|||
forceSSL = true;
|
||||
locations."/invite".return = " 301 https://discord.com/api/oauth2/authorize?client_id=831052837353816066&permissions=262144&scope=bot%20applications.commands";
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:9000";
|
||||
proxyPass = "http://127.0.0.1:${toString config.services.trucksimulatorbot.listenPort}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue