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 = [ ... ];