36 lines
736 B
Nix
36 lines
736 B
Nix
{ lib, pkgs, ... }:
|
|
{
|
|
c3d2 = {
|
|
isInHq = true;
|
|
hq.interface = "eth0";
|
|
};
|
|
networking = {
|
|
hostName = "matemat";
|
|
interfaces.eth0.useDHCP = lib.mkForce true;
|
|
firewall.allowedTCPPorts = [ 80 443 ];
|
|
};
|
|
|
|
services.yammat.enable = true;
|
|
|
|
services.nginx = {
|
|
enable = true;
|
|
recommendedProxySettings = true;
|
|
virtualHosts."matemat.hq.c3d2.de" = {
|
|
default = true;
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
locations."/" = {
|
|
proxyPass = "http://localhost:3000";
|
|
extraConfig = ''
|
|
auth_basic secured;
|
|
auth_basic_user_file ${pkgs.matemat-auth};
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
security.acme = {
|
|
acceptTerms = true;
|
|
email = "mail@c3d2.de";
|
|
};
|
|
}
|