mirror of
https://github.com/thiloho/nixos-config.git
synced 2025-11-22 11:31:36 +01:00
Make hedgedoc work properly
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
{ inputs, pkgs, config, ... }:
|
{ inputs, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@@ -44,6 +44,8 @@
|
|||||||
};
|
};
|
||||||
nginx = {
|
nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
recommendedProxySettings = true;
|
||||||
|
recommendedTlsSettings = true;
|
||||||
virtualHosts = {
|
virtualHosts = {
|
||||||
"thilohohlt.com" = {
|
"thilohohlt.com" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
@@ -55,6 +57,16 @@
|
|||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
root = inputs.aurora-blog-template.packages.${pkgs.system}.default;
|
root = inputs.aurora-blog-template.packages.${pkgs.system}.default;
|
||||||
};
|
};
|
||||||
|
"collab.thilohohlt.com" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/".proxyPass = "http://localhost:3300";
|
||||||
|
locations."/socket.io/" = {
|
||||||
|
proxyPass = "http://localhost:3300";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
extraConfig = "proxy_ssl_server_name on;";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
hedgedoc = {
|
hedgedoc = {
|
||||||
@@ -62,18 +74,24 @@
|
|||||||
settings = {
|
settings = {
|
||||||
port = 3300;
|
port = 3300;
|
||||||
domain = "collab.thilohohlt.com";
|
domain = "collab.thilohohlt.com";
|
||||||
useSSL = true;
|
|
||||||
db = {
|
db = {
|
||||||
dialect = "postgres";
|
dialect = "postgres";
|
||||||
host = "/run/postgresql";
|
host = "/run/postgresql";
|
||||||
database = "hedgedoc";
|
database = "hedgedoc";
|
||||||
};
|
};
|
||||||
|
protocolUseSSL = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
postgresql = {
|
postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.postgresql_15;
|
package = pkgs.postgresql_15;
|
||||||
ensureDatabases = [ "dcbot" "hedgedoc" ];
|
ensureDatabases = [ "dcbot" "hedgedoc" ];
|
||||||
|
ensureUsers = [
|
||||||
|
{
|
||||||
|
name = "hedgedoc";
|
||||||
|
ensurePermissions."DATABASE hedgedoc" = "ALL PRIVILEGES";
|
||||||
|
}
|
||||||
|
];
|
||||||
authentication = pkgs.lib.mkOverride 10 ''
|
authentication = pkgs.lib.mkOverride 10 ''
|
||||||
#type database DBuser auth-method
|
#type database DBuser auth-method
|
||||||
local all all trust
|
local all all trust
|
||||||
@@ -117,4 +135,3 @@
|
|||||||
};
|
};
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = "23.05";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ inputs, ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
services = {
|
services = {
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
{ pkgs }: pkgs.fetchurl {
|
|
||||||
url = "https://i.imgur.com/PDwmNTA.png";
|
|
||||||
hash = "sha256-bQM7RSjI/Lpn+7c9w0/Yr8JmD1ThfjGV9bMWpYFGceo=";
|
|
||||||
}
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user