feat(tilo): add calibre configuration
This commit is contained in:
parent
319d292fa0
commit
2921f3f435
@ -38,6 +38,7 @@
|
||||
trusted-users = ["root" "phundrak"];
|
||||
};
|
||||
services = {
|
||||
calibre.enable = true;
|
||||
endlessh.enable = true;
|
||||
plex = {
|
||||
enable = true;
|
||||
|
38
system/services/calibre.nix
Normal file
38
system/services/calibre.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
./calibre.nix
|
||||
./endlessh.nix
|
||||
./fwupd.nix
|
||||
./plex.nix
|
||||
|
Loading…
x
Reference in New Issue
Block a user