mirror of
https://github.com/nickolaj-jepsen/nixos.git
synced 2026-01-22 16:16:50 +01:00
feat: add audiobookshelf
This commit is contained in:
parent
392c77debd
commit
4aa1f38ab9
3 changed files with 42 additions and 0 deletions
35
modules/homelab/audiobookshelf.nix
Normal file
35
modules/homelab/audiobookshelf.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
lib.mkIf config.fireproof.homelab.enable (let
|
||||||
|
domain = "audiobookshelf.nickolaj.com";
|
||||||
|
port = 8234;
|
||||||
|
in {
|
||||||
|
services.restic.backups.homelab.paths = ["/var/lib/audiobookshelf"];
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."${domain}" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
http2 = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyWebsockets = true;
|
||||||
|
proxyPass = "http://localhost:${toString port}/";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.audiobookshelf = {
|
||||||
|
enable = true;
|
||||||
|
inherit port;
|
||||||
|
user = "media";
|
||||||
|
group = "media";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Create the audiobook, ebook, and podcast directories
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d /mnt/data/audiobooks 0775 media media -"
|
||||||
|
"d /mnt/data/books 0775 media media -"
|
||||||
|
"d /mnt/data/podcasts 0775 media media -"
|
||||||
|
];
|
||||||
|
})
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./arr.nix
|
./arr.nix
|
||||||
|
./audiobookshelf.nix
|
||||||
./glance.nix
|
./glance.nix
|
||||||
./home-assistant.nix
|
./home-assistant.nix
|
||||||
./jellyfin.nix
|
./jellyfin.nix
|
||||||
|
|
|
||||||
|
|
@ -193,6 +193,12 @@ in {
|
||||||
icon = "sh:jellyfin";
|
icon = "sh:jellyfin";
|
||||||
same-tab = true;
|
same-tab = true;
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
title = "Audiobookshelf";
|
||||||
|
url = "https://audiobookshelf.nickolaj.com";
|
||||||
|
icon = "sh:audiobookshelf";
|
||||||
|
same-tab = true;
|
||||||
|
}
|
||||||
{
|
{
|
||||||
title = "Sonarr";
|
title = "Sonarr";
|
||||||
url = "https://sonarr.nickolaj.com";
|
url = "https://sonarr.nickolaj.com";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue