backwards: Add calibre-web module
This commit is contained in:
32
hosts/backwards/modules/calibre-web/default.nix
Normal file
32
hosts/backwards/modules/calibre-web/default.nix
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{ lib, config, ... }:
|
||||||
|
let
|
||||||
|
enabled = config.mod.calibre-web.enable;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
mod.calibre-web = {
|
||||||
|
enable = lib.mkEnableOption "add calibre-web module";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf enabled {
|
||||||
|
services = {
|
||||||
|
calibre-web = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
user = "alex";
|
||||||
|
group = "users";
|
||||||
|
|
||||||
|
listen = {
|
||||||
|
ip = "0.0.0.0";
|
||||||
|
port = 8083;
|
||||||
|
};
|
||||||
|
|
||||||
|
options = {
|
||||||
|
calibreLibrary = "/home/alex/sync/books";
|
||||||
|
enableBookUploading = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user