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 ./factorio.nix
./forgejo.nix ./forgejo.nix
./freshrss.nix ./freshrss.nix
./hedgedoc.nix
./hydra.nix ./hydra.nix
./jellyfin.nix ./jellyfin.nix
./jupyter.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" ];
};
}

View file

@ -47,6 +47,9 @@ in
(mkIf config.services.hydra.enable { (mkIf config.services.hydra.enable {
inherit (secrets) hydra; inherit (secrets) hydra;
}) })
(mkIf config.services.hedgedoc.enable {
"hedgedoc" = withOwnerGroup "hedgedoc" secrets."hedgedoc";
})
]; ];
}; };
} }

BIN
secrets/hedgedoc.age Normal file

Binary file not shown.

View file

@ -36,4 +36,5 @@ in
"cloudflare.age".publicKeys = allKeys; "cloudflare.age".publicKeys = allKeys;
"smtp-password.age".publicKeys = allKeys; "smtp-password.age".publicKeys = allKeys;
"hydra.age".publicKeys = allKeys; "hydra.age".publicKeys = allKeys;
"hedgedoc.age".publicKeys = allKeys;
} }