challenger: add audiobookshelf
This commit is contained in:
parent
c0e19e7c21
commit
261b19f7c3
@ -13,6 +13,7 @@
|
|||||||
./filesystems.nix
|
./filesystems.nix
|
||||||
|
|
||||||
# ./services/archivebox.nix
|
# ./services/archivebox.nix
|
||||||
|
./services/audiobookshelf.nix
|
||||||
./services/calibre.nix
|
./services/calibre.nix
|
||||||
# ./services/ersatztv.nix
|
# ./services/ersatztv.nix
|
||||||
./services/jellyfin.nix
|
./services/jellyfin.nix
|
||||||
|
|||||||
56
hosts/challenger/services/audiobookshelf.nix
Normal file
56
hosts/challenger/services/audiobookshelf.nix
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
domain = "audiobooks.home.feal.no";
|
||||||
|
host = "127.0.1.2";
|
||||||
|
port = 5016;
|
||||||
|
in {
|
||||||
|
fileSystems = {
|
||||||
|
"/var/lib/audiobookshelf" = {
|
||||||
|
device = "/tank/media/audiobookshelf/config";
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.audiobookshelf = {
|
||||||
|
enable = true;
|
||||||
|
dataDir = "audiobookshelf";
|
||||||
|
inherit host port;
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.audiobookshelf = {
|
||||||
|
serviceConfig = {
|
||||||
|
# Better safe than sorry :)
|
||||||
|
CapabilityBoundingSet = "";
|
||||||
|
LockPersonality = true;
|
||||||
|
NoNewPrivileges = true;
|
||||||
|
PrivateDevices = true;
|
||||||
|
PrivateMounts = true;
|
||||||
|
PrivateTmp = true;
|
||||||
|
PrivateUsers = true;
|
||||||
|
ProtectClock = true;
|
||||||
|
ProtectHome = true;
|
||||||
|
ProtectHostname = true;
|
||||||
|
ProtectKernelLogs = true;
|
||||||
|
ProtectKernelModules = true;
|
||||||
|
ProtectKernelTunables = true;
|
||||||
|
ProtectProc = "invisible";
|
||||||
|
ProtectSystem = "strict";
|
||||||
|
ReadWritePaths = [
|
||||||
|
"/var/lib/audiobookshelf"
|
||||||
|
"/tank/media/audiobookshelf"
|
||||||
|
];
|
||||||
|
RemoveIPC = true;
|
||||||
|
RestrictSUIDSGID = true;
|
||||||
|
UMask = "0007";
|
||||||
|
RestrictAddressFamilies = [ "AF_UNIX AF_INET AF_INET6" ];
|
||||||
|
SystemCallArchitectures = "native";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts.${domain} = {
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://${host}:${toString port}";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user