mirror of
https://github.com/nmasur/dotfiles
synced 2026-07-29 17:38:36 +00:00
fix calibre-web write issue
This commit is contained in:
@@ -32,15 +32,11 @@ in
|
||||
reverseProxyAuth.enable = false;
|
||||
enableBookConversion = true;
|
||||
enableBookUploading = true;
|
||||
# Point this directly to the folder containing your 'metadata.db' file
|
||||
calibreLibrary = libraryPath;
|
||||
};
|
||||
};
|
||||
|
||||
# metadata.db lives in /var/lib/calibre-web-db and is symlinked into the
|
||||
# library dir; ProtectSystem=strict in the upstream module blocks writes
|
||||
# through symlinks unless the real target path is also listed.
|
||||
systemd.services.calibre-web.serviceConfig.ReadWritePaths = [ "/var/lib/calibre-web-db" ];
|
||||
|
||||
# Allow web traffic to Caddy
|
||||
nmasur.presets.services.caddy.routes = [
|
||||
{
|
||||
@@ -65,6 +61,13 @@ in
|
||||
# Grant user access to Calibre directories
|
||||
users.users.${username}.extraGroups = [ "calibre-web" ];
|
||||
|
||||
# Ensure the service has explicit filesystem read/write access to the library path
|
||||
# This fixes the "sqlite3.OperationalError: unable to open database file" bug
|
||||
systemd.services.calibre-web.serviceConfig.ReadWritePaths = [
|
||||
libraryPath
|
||||
"/var/lib/calibre-web-db"
|
||||
];
|
||||
|
||||
# Run a backup on a schedule
|
||||
systemd.timers.calibre-backup = lib.mkIf config.nmasur.presets.services.litestream.enable {
|
||||
timerConfig = {
|
||||
|
||||
Reference in New Issue
Block a user