diff --git a/hosts/backwards/modules/audiobookshelf/default.nix b/hosts/backwards/modules/audiobookshelf/default.nix new file mode 100644 index 0000000..4474ac8 --- /dev/null +++ b/hosts/backwards/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 { + fileSystems."/home/alex/media" = { + device = "/dev/disk/by-uuid/ad4acc0f-172c-40f8-8473-777c957e8764"; + fsType = "ext4"; + options = [ "nofail" ]; + }; + + services.audiobookshelf = { + enable = true; + + user = "alex"; + group = "users"; + + host = "0.0.0.0"; + port = 8000; + }; + }; +}