Skip to content

Commit

Permalink
modules (calibre-web): Configure path to library
Browse files Browse the repository at this point in the history
  • Loading branch information
britter committed Mar 4, 2025
1 parent 8a2e46b commit a8aebec
Showing 1 changed file with 28 additions and 20 deletions.
48 changes: 28 additions & 20 deletions modules/calibre-web/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,36 @@ in {
enable = lib.mkEnableOption "calibre-web";
};

config = lib.mkIf cfg.enable {
services.calibre-web = {
enable = true;
listen.ip = "0.0.0.0";
options = {
enableBookConversion = true;
enableBookUploading = true;
enableKepubify = true;
config = let
calibreLibraryPath = "/var/lib/calibre-library";
in
lib.mkIf cfg.enable {
services.calibre-web = {
enable = true;
listen.ip = "0.0.0.0";
options = {
enableBookConversion = true;
enableBookUploading = true;
enableKepubify = true;
calibreLibrary = calibreLibraryPath;
};
};
};

my.modules.https-proxy = {
configurations = [
{
fqdn = "books.${config.my.host.name}.ritter.family";
aliases = ["books.ritter.family"];
target = "http://localhost:8083";
extraConfig = ''
client_max_body_size 100M;
'';
}
systemd.tmpfiles.rules = [
"d ${calibreLibraryPath} 0755 calibre-web calibre-web"
];

my.modules.https-proxy = {
configurations = [
{
fqdn = "books.${config.my.host.name}.ritter.family";
aliases = ["books.ritter.family"];
target = "http://localhost:8083";
extraConfig = ''
client_max_body_size 100M;
'';
}
];
};
};
};
}

0 comments on commit a8aebec

Please sign in to comment.