forked from hacc/haccfiles
parsons: fix hegedocs
This commit is contained in:
parent
76c9b07d56
commit
632bf21200
3 changed files with 12 additions and 26 deletions
|
@ -12,8 +12,8 @@
|
||||||
../../services/mattermost.nix
|
../../services/mattermost.nix
|
||||||
../../services/thelounge.nix
|
../../services/thelounge.nix
|
||||||
../../services/murmur.nix
|
../../services/murmur.nix
|
||||||
../../services/hedgedoc_hacc.nix
|
../../services/hedgedoc-hacc.nix
|
||||||
../../services/hedgedoc_i4f.nix
|
../../services/hedgedoc-i4f.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
hexchen.encboot = {
|
hexchen.encboot = {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ config, lib, pkgs, profiles, modules, evalConfig, sources, ... }:
|
{ config, lib, pkgs, profiles, modules, evalConfig, sources, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
containers.hedgedoc = {
|
containers.pad-hacc = {
|
||||||
privateNetwork = true;
|
privateNetwork = true;
|
||||||
hostAddress = "192.168.100.1";
|
hostAddress = "192.168.100.1";
|
||||||
localAddress = "192.168.100.5";
|
localAddress = "192.168.100.5";
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
allowFreeURL = true;
|
allowFreeURL = true;
|
||||||
allowGravatar = false;
|
allowGravatar = false;
|
||||||
allowOrigin = [ "localhost" "pad.hacc.space" "fff-muc.de" ];
|
allowOrigin = [ "localhost" "pad.hacc.space" "fff-muc.de" ];
|
||||||
dbURL = "postgres://hedgedoc:hedgedoc@localhost:5432/hedgedoc";
|
dbURL = "postgres://codimd:codimd@localhost:5432/codimd";
|
||||||
defaultPermission = "limited";
|
defaultPermission = "limited";
|
||||||
domain = "pad.hacc.space";
|
domain = "pad.hacc.space";
|
||||||
host = "0.0.0.0";
|
host = "0.0.0.0";
|
||||||
|
@ -67,18 +67,19 @@
|
||||||
};
|
};
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ensureDatabases = [ "hedgedoc" ];
|
ensureDatabases = [ "codimd" ];
|
||||||
ensureUsers = [{
|
ensureUsers = [{
|
||||||
name = "hedgedoc";
|
name = "codimd";
|
||||||
ensurePermissions = {
|
ensurePermissions = {
|
||||||
"DATABASE hedgedoc" = "ALL PRIVILEGES";
|
"DATABASE codimd" = "ALL PRIVILEGES";
|
||||||
};
|
};
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
services.postgresqlBackup = {
|
services.postgresqlBackup = {
|
||||||
enable = true;
|
enable = true;
|
||||||
databases = [ "hedgedoc" ];
|
databases = [ "codimd" ];
|
||||||
startAt = "*-*-* 23:45:00";
|
startAt = "*-*-* 23:45:00";
|
||||||
|
location = "/persist/backups/postgres";
|
||||||
};
|
};
|
||||||
})).config.system.build.toplevel;
|
})).config.system.build.toplevel;
|
||||||
};
|
};
|
||||||
|
@ -92,16 +93,8 @@
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://192.168.100.3:3000";
|
proxyPass = "http://${config.containers.pad-hacc.localAddress}:3000";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
proxy_pass_request_headers on;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_set_header X-Forwarded-Host $http_host;
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection $http_connection;
|
|
||||||
add_header Access-Control-Allow-Origin "*";
|
add_header Access-Control-Allow-Origin "*";
|
||||||
proxy_buffering off;
|
proxy_buffering off;
|
||||||
'';
|
'';
|
|
@ -70,6 +70,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
databases = [ "hedgedoc" ];
|
databases = [ "hedgedoc" ];
|
||||||
startAt = "*-*-* 23:45:00";
|
startAt = "*-*-* 23:45:00";
|
||||||
|
location = "/persist/backups/postgres";
|
||||||
};
|
};
|
||||||
})).config.system.build.toplevel;
|
})).config.system.build.toplevel;
|
||||||
};
|
};
|
||||||
|
@ -78,16 +79,8 @@
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://192.168.100.41:3000";
|
proxyPass = "http://${config.containers.pad-i4f.localAddress}:3000";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
proxy_pass_request_headers on;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_set_header X-Forwarded-Host $http_host;
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection $http_connection;
|
|
||||||
add_header Access-Control-Allow-Origin "*";
|
add_header Access-Control-Allow-Origin "*";
|
||||||
proxy_buffering off;
|
proxy_buffering off;
|
||||||
'';
|
'';
|
Loading…
Reference in a new issue