feat(tilo): add calibre configuration

This commit is contained in:
Lucien Cartier-Tilet 2025-08-04 23:39:06 +02:00
parent 319d292fa0
commit 2921f3f435
3 changed files with 40 additions and 0 deletions

View File

@ -38,6 +38,7 @@
trusted-users = ["root" "phundrak"];
};
services = {
calibre.enable = true;
endlessh.enable = true;
plex = {
enable = true;

View File

@ -0,0 +1,38 @@
{
config,
lib,
...
}:
with lib; let
cfg = config.system.services.calibre;
in {
options.system.services.calibre = {
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;
};
};
}

View File

@ -1,5 +1,6 @@
{
imports = [
./calibre.nix
./endlessh.nix
./fwupd.nix
./plex.nix