From 69aba01d8c0237d2cf334d8e97b18b5a0ecebcac Mon Sep 17 00:00:00 2001 From: coolneng Date: Mon, 2 May 2022 01:49:40 +0200 Subject: [PATCH] Set up Openbooks --- modules/information.nix | 8 ++++++++ modules/webstack.nix | 13 +++++++++++++ 2 files changed, 21 insertions(+) diff --git a/modules/information.nix b/modules/information.nix index 7fc5a26..c155603 100644 --- a/modules/information.nix +++ b/modules/information.nix @@ -31,4 +31,12 @@ # Set environment variable pointing to wallabag configuration directory environment.variables.WALLABAG_DATA = "/var/lib/wallabag"; + + # Openbooks configuration + virtualisation.oci-containers.containers = { + openbooks = { + image = "evanbuss/openbooks"; + ports = [ "127.0.0.1:9000:80" ]; + }; + }; } diff --git a/modules/webstack.nix b/modules/webstack.nix index 2eb2121..dbc847a 100644 --- a/modules/webstack.nix +++ b/modules/webstack.nix @@ -121,6 +121,18 @@ }; }; }; + "books.coolneng.duckdns.org" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://localhost:9000/"; + extraConfig = '' + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + ''; + }; + }; }; }; @@ -136,6 +148,7 @@ "matrix.coolneng.duckdns.org" "element.coolneng.duckdns.org" "wallabag.coolneng.duckdns.org" + "books.coolneng.duckdns.org" ]; };