diff --git a/modules/nixos/services/audiobookshelf/default.nix b/modules/nixos/services/audiobookshelf/default.nix index fd05707..a75a4eb 100755 --- a/modules/nixos/services/audiobookshelf/default.nix +++ b/modules/nixos/services/audiobookshelf/default.nix @@ -1,6 +1,7 @@ { flake, config, ... }: let inherit (flake.config.services.instances) audiobookshelf web; + inherit (flake.config.machines.devices) ceres; service = audiobookshelf; host = "${service.subdomain}.${web.domains.url0}"; localhost = web.localhost.address0; @@ -10,6 +11,7 @@ in audiobookshelf = { enable = true; host = host; + dataDir = service.name; }; caddy = { virtualHosts = { @@ -28,6 +30,17 @@ in }; }; + fileSystems."/var/lib/${service.name}" = { + device = service.paths.path0; + fsType = "none"; + options = [ + "bind" + ]; + depends = [ + ceres.storage0.mount + ]; + }; + systemd.tmpfiles.rules = [ "Z ${service.paths.path0} 0755 ${service.name} ${service.name} -" ];