mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-04-25 16:08:30 +02:00
falkenstein: switch to caddy
This commit is contained in:
parent
7811c95ecf
commit
c96d8b7103
13 changed files with 76 additions and 121 deletions
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, trucksimulatorbot, ... }:
|
||||
let
|
||||
domain = "trucks.${config.networking.domain}";
|
||||
in
|
||||
|
@ -24,4 +24,16 @@ in
|
|||
];
|
||||
ensureDatabases = [ "trucksimulator" ];
|
||||
};
|
||||
# reverse_proxy unix//run/trucksimulator/app.sock
|
||||
services.caddy.virtualHosts."${domain}".extraConfig = ''
|
||||
redir /invite https://discord.com/api/oauth2/authorize?client_id=831052837353816066&permissions=262144&scope=bot%20applications.commands
|
||||
handle /docs* {
|
||||
file_server browse
|
||||
root * ${trucksimulatorbot.packages.x86_64-linux.docs}
|
||||
}
|
||||
route /images* {
|
||||
uri strip_prefix /images
|
||||
reverse_proxy unix//run/trucksimulator/images.sock
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue