Infini-DL360/hedgedoc: init

This commit is contained in:
Infinidoge 2024-09-23 13:27:04 -04:00
parent 0a3d4f54b3
commit 98239c4cba
Signed by: Infinidoge
SSH key fingerprint: SHA256:EMoPe5e2dO0gEvtBb2xkZTz5dkyL0rBmuiGTKG5s96E
5 changed files with 37 additions and 0 deletions

View file

@ -10,6 +10,7 @@
./factorio.nix
./forgejo.nix
./freshrss.nix
./hedgedoc.nix
./hydra.nix
./jellyfin.nix
./jupyter.nix

View file

@ -0,0 +1,32 @@
{ config, common, ... }:
let
cfg = config.services.hedgedoc;
domain = common.subdomain "md";
in
{
services.hedgedoc = {
enable = true;
environmentFile = config.secrets."hedgedoc";
settings = {
inherit domain;
protocolUseSSL = true;
port = 3003;
db = { dialect = "sqlite"; storage = "/srv/hedgedoc/db.sqlite"; };
uploadsPath = "/srv/hedgedoc/uploads";
allowFreeURL = true;
requireFreeURLAuthentication = true;
};
};
services.nginx.virtualHosts.${domain} = common.nginx.ssl // {
locations."/" = {
proxyPass = "http://${cfg.settings.host}:${toString cfg.settings.port}";
};
};
systemd.services.hedgedoc.serviceConfig = {
ReadWritePaths = [ "-/srv/hedgedoc" ];
};
}