Files
phundrak 5f4a7a4a42 refactor!: switch to dendritic pattern
BREAKING CHANGE: complete reorganization of the repository
2026-09-30 18:36:06 +02:00

41 lines
1021 B
Nix

{
flake.modules.nixos.calibre = {
config,
lib,
...
}:
with lib; let
cfg = config.mySystem.services.calibre;
in {
options.mySystem.services.calibre = {
enable = mkEnableOption "Enable Calibre Web";
user = mkOption {
type = types.str;
default = "phundrak";
};
group = mkOption {
type = types.str;
default = "users";
};
dataDir = mkOption {
type = types.str;
example = "/tank/calibre/conf";
default = "/tank/calibre/conf";
};
library = mkOption {
type = types.str;
example = "/tank/calibre/library";
default = "/tank/calibre/library";
};
};
config.services.calibre-web = mkIf cfg.enable {
inherit (cfg) enable user dataDir group;
options = {
calibreLibrary = cfg.library;
enableBookConversion = true;
enableBookUploading = true;
};
};
};
}