service/hedgedoc: update to 22.11

This commit is contained in:
Felix Buehler 2022-12-25 12:15:01 +01:00
parent cd9f8bcfbd
commit 57b440ad87

View file

@ -22,15 +22,9 @@ in
''; '';
}; };
configuration = mkOption {
type = types.attrs;
default = { };
description = "additional configurations";
};
port = mkOption { port = mkOption {
type = types.port; type = types.port;
default = 3000; default = 3080;
example = 8080; example = 8080;
description = "Internal port for webui"; description = "Internal port for webui";
}; };
@ -40,16 +34,22 @@ in
services.hedgedoc = { services.hedgedoc = {
enable = true; enable = true;
configuration = { settings = {
domain = "notes.${domain}"; domain = "notes.${domain}";
inherit (cfg) port;
host = "127.0.0.1";
protocolUseSSL = true; protocolUseSSL = true;
db = { db = {
dialect = "sqlite"; dialect = "sqlite";
storage = "/var/lib/hedgedoc/db.hedgedoc.sqlite"; storage = "/var/lib/hedgedoc/hedgedoc.sqlite";
}; };
} // cfg.configuration; } // cfg.settings;
}; };
# temporary fix for: https://github.com/NixOS/nixpkgs/issues/198250
#systemd.services.hedgedoc.serviceConfig.StateDirectory = lib.mkForce "/var/lib/hedgedoc";
systemd.services.hedgedoc.serviceConfig.StateDirectory = lib.mkForce "hedgedoc";
my.services.nginx.virtualHosts = [ my.services.nginx.virtualHosts = [
{ {
subdomain = "notes"; subdomain = "notes";