mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-09 22:12:56 +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, ... }:
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
let
|
|
||||||
|
|
||||||
# Must set group owner to calibre-web
|
|
||||||
libraryPath = "/var/books";
|
|
||||||
|
|
||||||
in {
|
|
||||||
|
|
||||||
imports = [ ./caddy.nix ];
|
imports = [ ./caddy.nix ];
|
||||||
|
|
||||||
@ -22,7 +15,6 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
options = {
|
options = {
|
||||||
calibreLibrary = libraryPath;
|
|
||||||
reverseProxyAuth.enable = false;
|
reverseProxyAuth.enable = false;
|
||||||
enableBookConversion = true;
|
enableBookConversion = true;
|
||||||
enableBookUploading = 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