From 3be151edeeb7ab0d5aad134497828d99c3a6a5f3 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Thu, 3 Nov 2022 21:49:32 +0100 Subject: [PATCH] Add a module for grav --- modules/grav/default.nix | 26 ++++++++++++++++++++++++++ systems/proxy/default.nix | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 modules/grav/default.nix diff --git a/modules/grav/default.nix b/modules/grav/default.nix new file mode 100644 index 0000000..b210c9c --- /dev/null +++ b/modules/grav/default.nix @@ -0,0 +1,26 @@ +{ ... }: +{ + virtualisation.oci-containers = { + backend = "docker"; + containers."grav" = { + image = "lscr.io/linuxserver/grav:latest"; + autoStart = true; + environment = { + TZ = "Europe/Zurich"; + PUID = "100"; + PGID = "101"; + }; + ports = [ + "8080:80" + ]; + volumes = [ + "/etc/timezone:/etc/timezone:ro" + "/etc/localtime:/etc/localtime:ro" + ]; + extraOptions = [ + ''--mount=type=volume,source=grav,target=/config,volume-driver=local,volume-opt=type=nfs,volume-opt=device=:/server_data/grav,"volume-opt=o=addr=10.7.89.108,rw,nfsvers=4.0,nolock,hard,noatime"'' + ]; + }; + }; +} + diff --git a/systems/proxy/default.nix b/systems/proxy/default.nix index 9763d79..701e0f5 100644 --- a/systems/proxy/default.nix +++ b/systems/proxy/default.nix @@ -10,6 +10,7 @@ }) "${inputs.self}/modules/nginx-acme-base" "${inputs.self}/modules/docker" + "${inputs.self}/modules/grav" "${inputs.self}/modules/haproxy" "${inputs.self}/modules/heimdall" "${inputs.self}/modules/rss-bridge" @@ -43,6 +44,7 @@ # This might create errors proxy_cookie_path / "/; secure; HttpOnly; SameSite=strict"; ''; + recommendedProxySettings = true; virtualHosts = { "2li.ch" = { serverAliases = [ "www.2li.ch" ];