Configured gospel to be a binary cache

This commit is contained in:
Alejandro Angulo 2023-01-15 12:32:38 -08:00
parent 9e819f7d1a
commit f5ec75fe96
Signed by: alejandro-angulo
GPG key ID: 75579581C74554B6

View file

@ -13,6 +13,8 @@
./vpn.nix
];
boot.binfmt.emulatedSystems = ["aarch64-linux"];
hardware.opengl = {
enable = true;
driSupport = true;
@ -156,6 +158,25 @@
nssmdns = true;
};
services.nix-serve = {
enable = true;
secretKeyFile = "/var/gospelCache";
};
services.nginx = {
enable = true;
virtualHosts = {
"gospel.kilonull.com" = {
serverAliases = ["gospel"];
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;
'';
};
};
};
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];