add media-audiobookshelf.nix
This commit is contained in:
parent
3f7246622b
commit
a6c1f6d846
2 changed files with 29 additions and 0 deletions
|
@ -21,6 +21,7 @@
|
|||
#./taskwarrior-pushover.nix
|
||||
|
||||
./media-share.nix
|
||||
./media-audiobookshelf.nix
|
||||
./media-tdarr.nix
|
||||
./media-jellyfin.nix
|
||||
|
||||
|
|
28
nixos/machines/chungus/media-audiobookshelf.nix
Normal file
28
nixos/machines/chungus/media-audiobookshelf.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
with pkgs;
|
||||
{
|
||||
users = {
|
||||
users.audiobookshelf.isSystemUser = true;
|
||||
users.audiobookshelf.group = "media";
|
||||
};
|
||||
|
||||
networking.firewall.interfaces.wg0.allowedTCPPorts = [ 8000 ];
|
||||
networking.firewall.interfaces.wg0.allowedUDPPorts = [ 8000 ];
|
||||
|
||||
systemd.services.audiobookshelf = {
|
||||
enable = true;
|
||||
description = "Self-hosted audiobook server for managing and playing audiobooks";
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
WorkingDirectory = "/srv/audiobookshelf";
|
||||
#ExecStart = "${unstable.audiobookshelf}/bin/audiobookshelf --host 127.0.0.1 --port 8000";
|
||||
ExecStart = "${unstable.audiobookshelf}/bin/audiobookshelf --port 8000";
|
||||
ExecReload = "${util-linux}/bin/kill -HUP $MAINPID";
|
||||
Restart = "always";
|
||||
User = config.users.users.audiobookshelf.name;
|
||||
Group = config.users.users.audiobookshelf.group;
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
requires = [ "network.target" ];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue