infrastructure/machines/web01/crabfit/default.nix

37 lines
718 B
Nix
Raw Normal View History

2024-06-06 11:39:20 +02:00
{ config, ... }:
{
imports = [ ./packages ];
services.crabfit = {
enable = true;
api.host = "api.meet.dgnum.eu";
frontend.host = "meet.dgnum.eu";
};
2024-02-21 22:55:10 +01:00
dgn-backups.postgresDatabases = [ "crabfit" ];
2024-06-06 11:39:20 +02:00
services.nginx =
let
cfg = config.services.crabfit;
in
{
enable = true;
virtualHosts.${cfg.frontend.host} = {
enableACME = true;
forceSSL = true;
locations."/".proxyPass = "http://127.0.0.1:${builtins.toString cfg.frontend.port}";
};
virtualHosts.${cfg.api.host} = {
enableACME = true;
forceSSL = true;
locations."/".proxyPass = "http://127.0.0.1:${builtins.toString cfg.api.port}";
};
};
}