From ee1b31954a93496a66cceaff0e108f3340fbe63b Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 1 Apr 2021 19:22:55 +0000 Subject: [PATCH] services: calibre-web: use upstream service --- services/calibre-web.nix | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/services/calibre-web.nix b/services/calibre-web.nix index f7b4695..d4d7ece 100644 --- a/services/calibre-web.nix +++ b/services/calibre-web.nix @@ -23,22 +23,19 @@ in }; config = lib.mkIf cfg.enable { - virtualisation.oci-containers.containers = { - calibre-web = { - image = "technosoft2000/calibre-web"; - volumes = [ - "${cfg.libraryPath}:/books" - ]; - ports = [ - "127.0.0.1:${toString cfg.port}:8083" - ]; - environment = { - # NOTE: should be configurable - SET_CONTAINER_TIMEZONE = "true"; - CONTAINER_TIMEZONE = "Europe/Paris"; - # Use 'media' group id - PDGID = toString config.users.groups.media.gid; - }; + services.calibre-web = { + enable = true; + + listen = { + ip = "127.0.0.1"; + port = cfg.port; + }; + + group = "media"; + + options = { + calibreLibrary = cfg.libraryPath; + enableBookConversion = true; }; }; @@ -51,6 +48,7 @@ in my.services.backup = { paths = [ + "/var/lib/calibre-web" # For `app.db` and `gdrive.db` cfg.libraryPath ]; };