This commit is contained in:
2026-02-09 21:05:02 -06:00
parent 319923c57c
commit 5e6edd00bb
3 changed files with 53 additions and 1 deletions

View File

@@ -0,0 +1,46 @@
{
lib,
config,
namespace,
...
}:
with lib;
let
name = "booklore";
cfg = config.${namespace}.services.${name};
bookloreConfig = lib.${namespace}.mkModule {
inherit config name;
serviceName = "podman-${name}";
description = "booklore";
options = { };
moduleConfig = {
virtualisation.oci-containers.containers.${name} = {
autoStart = true;
image = "booklore/booklore";
volumes = [
"${cfg.configDir}/booklore:/app/data"
"${cfg.configDir}/bookdrop:/bookdrop"
"${cfg.dataDir}/books:/books"
];
ports = [
"${toString cfg.port}:6060"
];
environment = {
DATABASE_URL = "jdbc:mariadb://localhost:3306/booklore";
DATABASE_USERNAME = "booklore";
# DATABASE_PASSWORD = ${DB_PASSWORD};
PUID = cfg.puid;
PGID = cfg.pgid;
TZ = cfg.timeZone;
};
};
};
};
in
{
imports = [ bookloreConfig ];
}
- ./data:/app/data
- ./books:/books
- ./bookdrop:/bookdrop

View File

@@ -43,6 +43,10 @@ in
port = 4822; port = 4822;
# environmentFile = "/run/secrets/jallen-nas/authentik-env"; # TODO # environmentFile = "/run/secrets/jallen-nas/authentik-env"; # TODO
}; };
booklore = {
enable = true;
port = 6060;
};
caddy = disabled; caddy = disabled;
calibre = { calibre = {
enable = false; enable = false;

View File

@@ -91,7 +91,9 @@
port = 3306; port = 3306;
}; };
initialDatabases = [ initialDatabases = [
"booklore" {
name = "booklore";
}
]; ];
ensureUsers = [ ensureUsers = [
{ {