forked from DGNum/infrastructure
36 lines
718 B
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}";
|
|
};
|
|
};
|
|
}
|