1module Site
2
3/// The path to the root ZFS store
4root: String = read?("prop:root") ?? read?("env:STUDIO_ROOT") ?? "/srv"
5pool: String = read?("prop:pool") ?? read?("env:STUDIO_POOL") ?? "studio-demo"
6nodeName: String = read?("prop:nodeName") ?? read?("env:STUDIO_NODE_NAME") ?? "clover-demo"
7/// The base domain that the infrastructure runs on
8domain: String = read?("prop:domain") ?? read?("env:STUDIO_DOMAIN") ?? "studio.test"
9ownerEmail: String = read?("prop:ownerEmail") ?? read?("env:STUDIO_OWNER_EMAIL") ?? "account@paperclover.net"
10cloverRoot: String = read?("prop:cloverRoot") ?? read?("env:STUDIO_CLOVER_ROOT") ?? "\(root)/clover"
11cloverUid: Int = (read?("prop:cloverUid") ?? read?("env:STUDIO_CLOVER_UID") ?? "3000").toInt()
12cloverGid: Int = (read?("prop:cloverGid") ?? read?("env:STUDIO_CLOVER_GID") ?? "3000").toInt()
13cloverReadOnly: Boolean = (read?("prop:cloverReadOnly") ?? read?("env:STUDIO_CLOVER_READ_ONLY") ?? "false") == "true"
14mediaRoot: String = read?("prop:mediaRoot") ?? read?("env:STUDIO_MEDIA_ROOT") ?? "\(cloverRoot)/Media"
15localAiSsdCache: String = read?("prop:localAiSsdCache") ?? read?("env:STUDIO_LOCAL_AI_SSD_CACHE") ?? "/var/cache/studio/local-ai"
16jellyfinFolders: Mapping<String, String> = new {
17 ["Anime"] = "Anime"
18 ["Movies"] = "Movies"
19 ["Shows"] = "Shows"
20 ["Indie Shows"] = "Indie Shows"
21 ["Independent"] = "Videos/Independent"
22 ["Paper Clover"] = "Videos/Paper Clover"
23}
24mediaReadOnly: Boolean = (read?("prop:mediaReadOnly") ?? read?("env:STUDIO_MEDIA_READ_ONLY") ?? "false") == "true"
25tlsInternal: Boolean = (read?("prop:tlsInternal") ?? read?("env:STUDIO_TLS_INTERNAL") ?? "false") == "true" || domain.endsWith(".test")
26preview: Boolean = (read?("prop:preview") ?? "false") == "true"