22 lines
578 B
Nix
22 lines
578 B
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
services.nix-serve = {
|
|
enable = true;
|
|
secretKeyFile = "/var/cache-priv-key.pem";
|
|
};
|
|
|
|
networking.firewall.allowedTCPPorts = [ config.services.nix-serve.port ];
|
|
|
|
services.nginx.virtualHosts."nix-serve.hq.c3d2.de" = {
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
locations."/".extraConfig = ''
|
|
proxy_pass http://localhost:${toString config.services.nix-serve.port};
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
'';
|
|
};
|
|
}
|