2023-04-21 07:15:05 +00:00
|
|
|
{ config, ... }:
|
|
|
|
let
|
|
|
|
svc-cfg = config.services.komga;
|
|
|
|
inherit (svc-cfg) user group port stateDir;
|
|
|
|
in
|
|
|
|
{
|
2023-11-08 15:32:50 +00:00
|
|
|
sane.persist.sys.byStore.plaintext = [
|
2024-02-23 15:49:54 +00:00
|
|
|
{ inherit user group; mode = "0700"; path = stateDir; method = "bind"; }
|
2023-04-21 07:15:05 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
services.komga.enable = true;
|
|
|
|
services.komga.port = 11319; # chosen at random
|
|
|
|
|
|
|
|
services.nginx.virtualHosts."komga.uninsane.org" = {
|
|
|
|
addSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://127.0.0.1:${builtins.toString port}";
|
|
|
|
};
|
|
|
|
};
|
2023-06-07 23:34:00 +00:00
|
|
|
sane.dns.zones."uninsane.org".inet.CNAME."komga" = "native";
|
2023-04-21 07:15:05 +00:00
|
|
|
}
|