mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-25 15:11:54 -05:00
moved audiobookshelf into a nix native container
This commit is contained in:
parent
f089730977
commit
8b03617cde
|
@ -14,18 +14,6 @@
|
||||||
|
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
oci-containers.containers = {
|
oci-containers.containers = {
|
||||||
audiobookshelf = {
|
|
||||||
ports = ["0.0.0.0:13378:80"];
|
|
||||||
image = "ghcr.io/advplyr/audiobookshelf:latest";
|
|
||||||
environment = {
|
|
||||||
TZ = "America/New_York";
|
|
||||||
};
|
|
||||||
volumes = [
|
|
||||||
"abs_config:/config"
|
|
||||||
"abs_metadata:/metadata"
|
|
||||||
"/mnt/Media:/Media"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
plex-server = {
|
plex-server = {
|
||||||
ports = ["0.0.0.0:32400:32400"];
|
ports = ["0.0.0.0:32400:32400"];
|
||||||
image = "plexinc/pms-docker:public";
|
image = "plexinc/pms-docker:public";
|
||||||
|
@ -77,6 +65,24 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
containers.audiobookshelf = {
|
||||||
|
autoStart = true;
|
||||||
|
bindMounts = {
|
||||||
|
"/Media" = { hostPath = "/mnt/Media";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = { config, pkgs, lib, ... }: {
|
||||||
|
services.audiobookshelf = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
port = 13378;
|
||||||
|
host = "0.0.0.0";
|
||||||
|
};
|
||||||
|
system.stateVersion = "24.05";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
security.acme = {
|
security.acme = {
|
||||||
acceptTerms = true;
|
acceptTerms = true;
|
||||||
defaults.email = "alyraffauf@gmail.com";
|
defaults.email = "alyraffauf@gmail.com";
|
||||||
|
@ -106,7 +112,7 @@
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://127.0.0.1:13378";
|
proxyPass = "http://127.0.0.1:13378";
|
||||||
proxyWebsockets = true; # needed if you need to use WebSocket
|
# proxyWebsockets = true; # This breaks audiobookshelf.
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
|
Loading…
Reference in a new issue