@@ -16,9 +16,10 @@ let
1616 ''
1717 "webui":
1818 {
19− ${optionalEmptyStr cfg.httpLogin "\"login\": \"${cfg.httpLogin}\","}
20− ${optionalEmptyStr cfg.httpPass "\"password\": \"${cfg.httpPass}\","}
21− ${optionalEmptyStr cfg.apiKey "\"api_key\": \"${cfg.apiKey}\","}
19+ ${optionalEmptyStr cfg.httpLogin "\"login\": \"${cfg.httpLogin}\","}
20+ ${optionalEmptyStr cfg.httpPass "\"password\": \"${cfg.httpPass}\","}
21+ ${optionalEmptyStr cfg.apiKey "\"api_key\": \"${cfg.apiKey}\","}
22+ ${optionalEmptyStr cfg.directoryRoot "\"directory_root\": \"${cfg.directoryRoot}\","}
2223 "listen": "${listenAddr}"
2324 }
2425 '';
@@ -221,6 +222,13 @@ in
221222 description = "API key, which enables the developer API.";
222223 };
223224
225+ directoryRoot = mkOption {
226+ type = types.str;
227+ default = "";
228+ example = "/media";
229+ description = "Default directory to add folders in the web UI.";
230+ };
231+
224232 sharedFolders = mkOption {
225233 default = [];
226234 example =