dots/modules/hosts/nixos/nixnuc/containers/audiobookshelf.nix
Gene Liverman 1eb75018d3 Change Audiobookshelf mountpoint to service's default
This is being done as a step before moving to the nix version of ABS.
That change would be included here too, but I ran into a bug:

```
[2024-12-02 19:53:46.433] FATAL: [Server] Unhandled rejection: [Error: EACCES: permission denied, mkdir '/metadata'] {
  errno: -13,
  code: 'EACCES',
  syscall: 'mkdir',
  path: '/metadata'
}
promise: Promise {
  <rejected> [Error: EACCES: permission denied, mkdir '/metadata'] {
    errno: -13,
    code: 'EACCES',
    syscall: 'mkdir',
    path: '/metadata'
  }
}

```

No idea why yet so the container lives on.

To setup the mountpoint, I ran `zfs set mountpoint=legacy
orico/audiobookshelf` and created the directory used as the mount in the
`fileSystems` section.
2024-12-02 21:43:50 -05:00

32 lines
1 KiB
Nix

{ ... }: let
volume_base = "/var/lib/audiobookshelf";
http_port = "13378";
in {
# Audiobookshelf
#############################################################################
# I am using v2.17.2 because that is the current one in nix 24.11. #
# My plan is to switch from Podman to the native NixOS service #
#############################################################################
virtualisation.oci-containers.containers = {
"audiobookshelf" = {
autoStart = true;
image = "ghcr.io/advplyr/audiobookshelf:2.17.2";
environment = {
AUDIOBOOKSHELF_UID = "99";
AUDIOBOOKSHELF_GID = "100";
};
ports = [ "${http_port}:80" ];
volumes = [
"${volume_base}/audiobooks:/audiobooks"
"${volume_base}/podcasts:/podcasts"
"${volume_base}/printbooks:/printbooks"
"${volume_base}/config:/config"
"${volume_base}/metadata:/metadata"
];
};
};
services.restic.backups.daily.paths = [ volume_base ];
}