From b94b586d5b164f88cb74c2e4a3224780316767f9 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Tue, 19 Oct 2021 07:06:37 +0100 Subject: [PATCH] clouvider-fra01: add content.int.lukegb.com --- ops/nixos/clouvider-fra01/default.nix | 15 ++++++++++++++- ops/nixos/etheroute-lon01/default.nix | 1 + web/int/index.html | 5 +++-- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ops/nixos/clouvider-fra01/default.nix b/ops/nixos/clouvider-fra01/default.nix index 7e653c0b29..2fbda97686 100644 --- a/ops/nixos/clouvider-fra01/default.nix +++ b/ops/nixos/clouvider-fra01/default.nix @@ -18,10 +18,20 @@ let "int.lukegb.com" = depot.web.int; "logged-out.int.lukegb.com" = depot.web.logged-out-int; }; + other = _apply lib.id { + "content.int.lukegb.com" = { + locations."/" = { + alias = "/store/content/"; + extraConfig = '' + autoindex on; + ''; + }; + }; + }; _apply = f: builtins.mapAttrs (name: value: lib.recursiveUpdate hostBase (f value)); }; }; - vhosts = vhostsConfig.int.proxy // vhostsConfig.int.serve; + vhosts = vhostsConfig.int.proxy // vhostsConfig.int.serve // vhostsConfig.int.other; hostBase = { listen = [{ addr = config.my.ip.tailscale; @@ -181,6 +191,9 @@ in { enable = true; virtualHosts = vhosts; }; + systemd.services.nginx.serviceConfig = { + SupplementaryGroups = [ "content" ]; + }; services.ipfs = { enable = true; diff --git a/ops/nixos/etheroute-lon01/default.nix b/ops/nixos/etheroute-lon01/default.nix index 17ff7c39e6..0ff89ed423 100644 --- a/ops/nixos/etheroute-lon01/default.nix +++ b/ops/nixos/etheroute-lon01/default.nix @@ -226,6 +226,7 @@ in { (service "clouvider-fra01" "sonarr.int.lukegb.com" {}) (service "clouvider-fra01" "radarr.int.lukegb.com" {}) (service "clouvider-fra01" "deluge.int.lukegb.com" {}) + (service "clouvider-fra01" "content.int.lukegb.com" {}) (service "totoro:9090" "prometheus.int.lukegb.com" {}) (service "totoro:9093" "alertmanager.int.lukegb.com" {}) (service "totoro:3000" "grafana.int.lukegb.com" {}) diff --git a/web/int/index.html b/web/int/index.html index f96ea2d8d3..cd58a2c2a7 100644 --- a/web/int/index.html +++ b/web/int/index.html @@ -12,8 +12,9 @@ SPDX-License-Identifier: Apache-2.0

int.lukegb.com