configure domain in a central file
This commit is contained in:
parent
865e1251de
commit
d459fa895e
8 changed files with 52 additions and 30 deletions
|
@ -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}";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue