2019-09-05 17:14:06 +02:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
services.nix-serve = {
|
|
|
|
enable = true;
|
|
|
|
secretKeyFile = "/var/cache-priv-key.pem";
|
|
|
|
};
|
|
|
|
|
|
|
|
services.nginx.virtualHosts."nix-serve.hq.c3d2.de" = {
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
locations."/".extraConfig = ''
|
2019-11-09 15:16:02 +01:00
|
|
|
proxy_pass http://127.0.0.1:${toString config.services.nix-serve.port};
|
2019-09-05 17:14:06 +02:00
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
'';
|
|
|
|
};
|
2019-09-30 17:04:17 +02:00
|
|
|
|
|
|
|
services.nginx.virtualHosts."depot.hq.c3d2.de" = {
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
locations."/".root = "/srv/www/depot";
|
|
|
|
};
|
|
|
|
|
2019-09-05 17:14:06 +02:00
|
|
|
}
|