From 8ddfcf6c17b06ee5bb8b2d2a898ac43bd504183e Mon Sep 17 00:00:00 2001 From: clerie Date: Sun, 13 Nov 2022 16:38:18 +0100 Subject: [PATCH] hosts/hydra-1: add nix-cache.clerie.de --- hosts/hydra-1/configuration.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hosts/hydra-1/configuration.nix b/hosts/hydra-1/configuration.nix index 655fb32..8501cec 100644 --- a/hosts/hydra-1/configuration.nix +++ b/hosts/hydra-1/configuration.nix @@ -46,6 +46,13 @@ useSubstitutes = true; }; + services.nix-serve = { + enable = true; + port = 5005; + bindAddress = "127.0.0.1"; + secretKeyFile = "/var/src/secrets/nix-serve/secret-key.key"; + }; + services.nginx.enable = true; services.nginx.virtualHosts = { "hydra.clerie.de" = { @@ -57,6 +64,13 @@ }; }; }; + "nix-cache.clerie.de" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://localhost:5005"; + }; + }; }; networking.firewall.allowedTCPPorts = [ 80 443 ];