WS-KCNHUB/machines/kcnhub/servers/overleaf.nix

47 lines
1.3 KiB
Nix
Raw Normal View History

2023-11-07 09:46:33 -05:00
{ config, pkgs, lib, ... }: let
stateDir = "/var/lib/overleaf";
in {
users = {
users.overleaf = {
description = "Overleaf LaTeX Server";
useDefaultShell = true;
group = "overleaf";
# "Normal" User: for Podman Usage
isNormalUser = true;
2023-11-07 09:46:33 -05:00
home = stateDir;
linger = true;
2023-11-07 09:46:33 -05:00
};
groups.overleaf = {};
};
2023-11-07 13:06:10 -05:00
services.caddy.virtualHosts = {
"overleaf.ws.kcnhub.com" = {
extraConfig = ''
reverse_proxy 127.0.0.1:7080
'';
};
};
2023-11-07 09:46:33 -05:00
# Overleaf only officially supports container based installation
# For ease of use and compatability we shall follow suit (for now)
# An imperative installation is described below, to be updated
# to a declarative installation at a later date (with no loss of data)
#
# Imperative Description:
#
# Overleaf/toolkit installed in $stateDir:
# https://github.com/overleaf/toolkit
#
# This repository contains scripts to configure
# and instantiate overleaf in the same directory
# (hence making declarative pure description more difficult)
#
# These scripts configure a set of containers (docker/podman)
# overleaf (sharelatex)
# MongoDB
# Redis
#
# These are the things that will need to be migrated, come a declarative port
# All Relevant files will be stored in the $stateDir.
}