switch to /var/lib for calibre-web

This commit is contained in:
Noah Masur 2022-10-15 15:29:21 +00:00
parent bc83c818db
commit 5410afb45b

View File

@ -1,11 +1,4 @@
{ config, pkgs, lib, ... }:
let
# Must set group owner to calibre-web
libraryPath = "/var/books";
in {
{ config, pkgs, lib, ... }: {
imports = [ ./caddy.nix ];
@ -22,7 +15,6 @@ in {
enable = true;
openFirewall = true;
options = {
calibreLibrary = libraryPath;
reverseProxyAuth.enable = false;
enableBookConversion = true;
enableBookUploading = true;
@ -47,22 +39,6 @@ in {
}];
}];
# Create directory and set permissions
systemd.services.calibre-library = {
requiredBy = [ "calibre-web.service" ];
before = [ "calibre-web.service" ];
serviceConfig = {
Type = "oneshot";
User = "root";
};
script = ''
mkdir --parents ${libraryPath}
chown -R calibre-web:calibre-web ${libraryPath}
chmod 0775 ${libraryPath}
chmod -R 0640 ${libraryPath}/*
'';
};
};
}