infrastructure/machines/web01/crabfit/default.nix

36 lines
718 B
Nix

{ config, ... }:
{
imports = [ ./packages ];
services.crabfit = {
enable = true;
api.host = "api.meet.dgnum.eu";
frontend.host = "meet.dgnum.eu";
};
dgn-backups.postgresDatabases = [ "crabfit" ];
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}";
};
};
}