mirror of
https://github.com/nmasur/dotfiles
synced 2024-12-25 06:34:52 +00:00
switch to /var/lib for calibre-web
This commit is contained in:
parent
bc83c818db
commit
5410afb45b
@ -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}/*
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user