From 84fa63493ff42c38405d807fd1ad698a75a3f495 Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Mon, 8 Jan 2024 20:10:46 +0000 Subject: [PATCH] catacomb: serve mirror directly --- machine/catacomb/default.nix | 1 + machine/catacomb/mirror.nix | 14 ++++++++++++++ modules/beatific.nix | 1 + 3 files changed, 16 insertions(+) create mode 100644 machine/catacomb/mirror.nix diff --git a/machine/catacomb/default.nix b/machine/catacomb/default.nix index abfa293..7076f21 100644 --- a/machine/catacomb/default.nix +++ b/machine/catacomb/default.nix @@ -4,6 +4,7 @@ imports = [ ./hardware-configuration.nix ./fileserver.nix + ./mirror.nix ]; beatific.hostName = "catacomb"; diff --git a/machine/catacomb/mirror.nix b/machine/catacomb/mirror.nix new file mode 100644 index 0000000..6d9b161 --- /dev/null +++ b/machine/catacomb/mirror.nix @@ -0,0 +1,14 @@ +{ ... }: + +{ + # Configure nginx to serve /nas/doc/website/mirror/ + services.nginx = { + enable = true; + virtualHosts."mirror.catacomb.home" = { + listen = [ { addr = "10.22.20.2"; } ]; + root = "/nas/doc/website/mirror"; + }; + }; + + users.users.nginx.extraGroups = ["nas"]; +} diff --git a/modules/beatific.nix b/modules/beatific.nix index d4a758c..d6623cd 100644 --- a/modules/beatific.nix +++ b/modules/beatific.nix @@ -219,6 +219,7 @@ in { ]; "10.22.20.2" = [ "catacomb.home" + "mirror.catacomb.home" ]; "10.22.20.3" = [ "palamas.home"