Compare commits

...

2 commits

Author SHA1 Message Date
Tom Hubrecht c2d7adfcd0 feat(compute01): Deploy hedgedoc on pads.dgnum.eu 2023-10-05 09:52:13 +02:00
Tom Hubrecht 7873680895 fix(onlyoffice): Remove unusable patches 2023-10-05 09:17:06 +02:00
5 changed files with 54 additions and 4 deletions

View file

@ -10,6 +10,7 @@ lib.extra.mkConfig {
enabledServices = [
# List of services to enable
"ds-fr"
"hedgedoc"
"kanidm"
"mastodon"
"nextcloud"

View file

@ -0,0 +1,51 @@
{ config, lib, ... }:
let
host = "pads.dgnum.eu";
port = 3007;
in {
services = {
hedgedoc = {
enable = true;
environmentFile = config.age.secrets."hedgedoc-environment_file".path;
settings = {
inherit port;
domain = host;
host = "127.0.0.1";
allowOrigin = [ host ];
db = {
dialect = "postgres";
host = "/run/postgresql";
};
};
};
nginx.virtualHosts.${host} = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${builtins.toString port}";
proxyWebsockets = true;
};
};
postgresql = {
enable = true;
ensureDatabases = [ "hedgedoc" ];
ensureUsers = [{
name = "hedgedoc";
ensurePermissions = { "DATABASE hedgedoc" = "ALL PRIVILEGES"; };
}];
};
};
systemd.services.hedgedoc.serviceConfig.StateDirectory =
lib.mkForce [ "hedgedoc" "hedgedoc/uploads" ];
}

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ config, ... }:
let hostname = "documentserver.dgnum.eu";
in {
@ -10,9 +10,6 @@ in {
jwtSecretFile = config.age.secrets."onlyoffice-jwt_secret_file".path;
port = 8015;
package = pkgs.onlyoffice-documentserver.overrideAttrs
(old: { patches = (old.patches or [ ]) ++ [ ./secrets.patch ]; });
};
services.nginx.virtualHosts.${hostname} = {

Binary file not shown.

View file

@ -5,6 +5,7 @@ in
lib.setDefault { inherit publicKeys; } [
"ds_fr-secret_file"
"hedgedoc-environment_file"
"mastodon-extra_env_file"
"nextcloud-adminpass_file"
"nextcloud-s3_secret_file"