configure domain in a central file

This commit is contained in:
eyjhb 2024-08-11 14:50:32 +02:00
parent 865e1251de
commit d459fa895e
Signed by: eyjhb
GPG key ID: 609F508E3239F920
8 changed files with 52 additions and 30 deletions

View file

@ -1,7 +1,8 @@
{ config, ... }:
let
domain = "hedgedoc.fricloud.dk";
svc_domain = "hedgedoc.${config.mine.settings.domain}";
stateDir = config.mine.zfsMounts."rpool/safe/svcs/hedgedoc";
in {
services.hedgedoc = {
@ -9,7 +10,7 @@ in {
settings = {
# only change default port, because 3000 is used by other service
port = 6864;
domain = domain;
domain = svc_domain;
protocolUseSSL = true;
debug = true;
uploadsPath = stateDir + "/uploads";
@ -41,7 +42,7 @@ in {
systemd.services.hedgedoc.serviceConfig.ReadWritePaths = [ stateDir ];
systemd.services.hedgedoc.serviceConfig.EnvironmentFile = config.age.secrets.lldap-bind-user-pass-hedgedoc-env.path;
services.nginx.virtualHosts."${domain}" = {
services.nginx.virtualHosts."${svc_domain}" = {
forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://localhost:${builtins.toString config.services.hedgedoc.settings.port}";