From f5ec75fe965d66e01e9c8c599e209d424bf6afe2 Mon Sep 17 00:00:00 2001 From: Alejandro Angulo Date: Sun, 15 Jan 2023 12:32:38 -0800 Subject: [PATCH] Configured gospel to be a binary cache --- system/gospel/configuration.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/system/gospel/configuration.nix b/system/gospel/configuration.nix index 5ea959f..cf5b92c 100644 --- a/system/gospel/configuration.nix +++ b/system/gospel/configuration.nix @@ -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 = [ ... ];