Add calibre book services
This commit is contained in:
parent
05d39eeafc
commit
fd12a7394a
|
@ -23,21 +23,8 @@
|
|||
./services/gitea.nix
|
||||
./services/hedgedoc.nix
|
||||
./services/vaultwarden.nix
|
||||
./services/calibre.nix
|
||||
# ./services/code-server.nix
|
||||
# TODO:
|
||||
# x Boot
|
||||
# x Mount ZFS
|
||||
# x Monitoring server
|
||||
# x Podman
|
||||
# x Flame
|
||||
# x Transmission
|
||||
# x Jellyfin
|
||||
# x NFS imports
|
||||
# x NFS exports
|
||||
# - FreeBSD VM
|
||||
# - Kali VM
|
||||
# x Kerberos / IPA / Kanidm
|
||||
# - Backup system
|
||||
];
|
||||
|
||||
networking = {
|
||||
|
|
|
@ -11,8 +11,10 @@
|
|||
services.nfs.server = {
|
||||
enable = true;
|
||||
exports = ''
|
||||
/export 192.168.10.4(rw,fsid=0,no_subtree_check)
|
||||
/export 192.168.10.4(rw,fsid=0,no_subtree_check) 192.168.10.5(rw,fsid=0,no_subtree_check)
|
||||
/export/riker-backup 192.168.10.4(rw,nohide,no_subtree_check,no_root_squash)
|
||||
/export/doyle-backup 192.168.10.5(rw,nohide,no_subtree_check,no_root_squash)
|
||||
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
domain = "books.home.feal.no";
|
||||
storage = "/tank/media/books";
|
||||
cfg = config.services.calibre-web;
|
||||
in {
|
||||
services = {
|
||||
nginx.virtualHosts.${domain} = {
|
||||
locations."/".proxyPass =
|
||||
"http://${cfg.listen.ip}:${toString cfg.listen.port}";
|
||||
locations."/opds".proxyPass =
|
||||
"http://${cfg.listen.ip}:${toString cfg.listen.port}";
|
||||
};
|
||||
|
||||
calibre-server = {
|
||||
enable = true;
|
||||
user = "calibre-server";
|
||||
libraries = [ storage ];
|
||||
};
|
||||
|
||||
calibre-web = {
|
||||
enable = true;
|
||||
user = "calibre-server";
|
||||
listen.ip = "127.0.0.1";
|
||||
listen.port = 5010;
|
||||
options = {
|
||||
calibreLibrary = storage;
|
||||
enableBookConversion = true;
|
||||
enableBookUploading = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue