diff --git a/hosts/voyager/configuration.nix b/hosts/voyager/configuration.nix index d08c8c5..7b1ef98 100644 --- a/hosts/voyager/configuration.nix +++ b/hosts/voyager/configuration.nix @@ -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 = { diff --git a/hosts/voyager/exports.nix b/hosts/voyager/exports.nix index 7acb7e6..64e2f4e 100644 --- a/hosts/voyager/exports.nix +++ b/hosts/voyager/exports.nix @@ -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) + ''; }; diff --git a/hosts/voyager/services/calibre.nix b/hosts/voyager/services/calibre.nix new file mode 100644 index 0000000..0563942 --- /dev/null +++ b/hosts/voyager/services/calibre.nix @@ -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; + }; + }; + }; +}