diff --git a/modules/hosts/nixos/nixnuc/audiobookshelf.nix b/modules/hosts/nixos/nixnuc/audiobookshelf.nix deleted file mode 100644 index 5730b8c..0000000 --- a/modules/hosts/nixos/nixnuc/audiobookshelf.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ ... }: let - volume_base = "/orico/audiobookshelf"; -in { - # Audiobookshelf - virtualisation.oci-containers.containers = { - "audiobookshelf" = { - autoStart = true; - image = "ghcr.io/advplyr/audiobookshelf:latest"; - environment = { - AUDIOBOOKSHELF_UID = "99"; - AUDIOBOOKSHELF_GID = "100"; - }; - ports = [ "13378: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 = [ - "/orico/audiobookshelf" - ]; -} diff --git a/modules/hosts/nixos/nixnuc/containers/audiobookshelf.nix b/modules/hosts/nixos/nixnuc/containers/audiobookshelf.nix new file mode 100644 index 0000000..44d63d3 --- /dev/null +++ b/modules/hosts/nixos/nixnuc/containers/audiobookshelf.nix @@ -0,0 +1,33 @@ +{ ... }: let + volume_base = "/orico/audiobookshelf"; + http_port = "13378"; +in { + # Audiobookshelf + + ############################################################################# + # I am using v2.8.1 because that is both the current Docker image and # + # the current version in nixpkgs unstable. My plan is to switch from Podman # + # to a systemd-nspawn container. # + ############################################################################# + + virtualisation.oci-containers.containers = { + "audiobookshelf" = { + autoStart = true; + image = "ghcr.io/advplyr/audiobookshelf:2.8.1"; + 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 ]; +} diff --git a/modules/hosts/nixos/nixnuc/default.nix b/modules/hosts/nixos/nixnuc/default.nix index e3e4408..b7b338d 100644 --- a/modules/hosts/nixos/nixnuc/default.nix +++ b/modules/hosts/nixos/nixnuc/default.nix @@ -1,7 +1,7 @@ { config, pkgs, username, ... }: { imports = [ ./hardware-configuration.nix - ./audiobookshelf.nix + ./containers/audiobookshelf.nix ./containers/nginx-proxy.nix ../../../system/common/linux/restic.nix ];