nix-config/system/services/calibre.nix

39 lines
856 B
Nix
Raw Normal View History

2025-08-04 23:39:06 +02:00
{
config,
lib,
...
}:
with lib; let
2025-08-15 21:33:22 +02:00
cfg = config.mySystem.services.calibre;
2025-08-04 23:39:06 +02:00
in {
2025-08-15 21:33:22 +02:00
options.mySystem.services.calibre = {
2025-08-04 23:39:06 +02:00
enable = mkEnableOption "Enable Calibre Web";
user = mkOption {
type = types.string;
default = "phundrak";
};
group = mkOption {
type = types.string;
default = "users";
};
dataDir = mkOption {
type = types.string;
example = "/tank/calibre/conf";
default = "/tank/calibre/conf";
};
library = mkOption {
type = types.string;
example = "/tank/calibre/library";
default = "/tank/calibre/library";
};
};
config.services.calibre-web = mkIf cfg.enable {
inherit (cfg) enable user group dataDir;
options = {
calibreLibrary = cfg.library;
enableBookConversion = true;
enableBookUploading = true;
};
};
}