diff --git a/nixos/modules/services/web-apps/calibre-web.nix b/nixos/modules/services/web-apps/calibre-web.nix index c452f25b7984..85e0348ed78a 100644 --- a/nixos/modules/services/web-apps/calibre-web.nix +++ b/nixos/modules/services/web-apps/calibre-web.nix @@ -187,6 +187,9 @@ in NoNewPrivileges = true; ProtectSystem = "strict"; + ReadWritePaths = + lib.optional (lib.hasPrefix "/" cfg.dataDir) cfg.dataDir + ++ lib.optional (cfg.options.calibreLibrary != null) cfg.options.calibreLibrary; PrivateTmp = true; PrivateDevices = true; PrivateIPC = true;