diff --git a/hosts/manatee/modules/audiobookshelf/default.nix b/hosts/manatee/modules/audiobookshelf/default.nix new file mode 100644 index 0000000..3a76565 --- /dev/null +++ b/hosts/manatee/modules/audiobookshelf/default.nix @@ -0,0 +1,29 @@ +{ lib, config, ... }: +let + enabled = config.mod.audiobookshelf.enable; +in +{ + options = { + mod.audiobookshelf = { + enable = lib.mkEnableOption "Enable audiobookshelf module"; + }; + }; + + config = lib.mkIf enabled { + users.users.audiobookshelf = { + isSystemUser = true; + description = "audiobookshelf"; + group = "storage"; + }; + + services.audiobookshelf = { + enable = true; + + user = "audiobookshelf"; + group = "storage"; + + host = "0.0.0.0"; + port = 8000; + }; + }; +} diff --git a/hosts/manatee/modules/default.nix b/hosts/manatee/modules/default.nix index 34704d4..7eeffd8 100644 --- a/hosts/manatee/modules/default.nix +++ b/hosts/manatee/modules/default.nix @@ -14,6 +14,7 @@ in git.enable = true; transmission.enable = true; + audiobookshelf.enable = true; }; }; }