nixos/resilio: fix directoryRoot configuration
The resilio module places the directoryRoot configuration in the webui section. However, the generated configuration fails on the current version of Resilio Sync with: Invalid key context: 'directory_root' must be in global config section This change places this key in the global configuration section to solve this error.
This commit is contained in:
parent
704bd03243
commit
b9e0992e87
@ -30,12 +30,12 @@ let
|
|||||||
download_limit = cfg.downloadLimit;
|
download_limit = cfg.downloadLimit;
|
||||||
upload_limit = cfg.uploadLimit;
|
upload_limit = cfg.uploadLimit;
|
||||||
lan_encrypt_data = cfg.encryptLAN;
|
lan_encrypt_data = cfg.encryptLAN;
|
||||||
} // optionalAttrs cfg.enableWebUI {
|
} // optionalAttrs (cfg.directoryRoot != "") { directory_root = cfg.directoryRoot; }
|
||||||
|
// optionalAttrs cfg.enableWebUI {
|
||||||
webui = { listen = "${cfg.httpListenAddr}:${toString cfg.httpListenPort}"; } //
|
webui = { listen = "${cfg.httpListenAddr}:${toString cfg.httpListenPort}"; } //
|
||||||
(optionalAttrs (cfg.httpLogin != "") { login = cfg.httpLogin; }) //
|
(optionalAttrs (cfg.httpLogin != "") { login = cfg.httpLogin; }) //
|
||||||
(optionalAttrs (cfg.httpPass != "") { password = cfg.httpPass; }) //
|
(optionalAttrs (cfg.httpPass != "") { password = cfg.httpPass; }) //
|
||||||
(optionalAttrs (cfg.apiKey != "") { api_key = cfg.apiKey; }) //
|
(optionalAttrs (cfg.apiKey != "") { api_key = cfg.apiKey; });
|
||||||
(optionalAttrs (cfg.directoryRoot != "") { directory_root = cfg.directoryRoot; });
|
|
||||||
} // optionalAttrs (sharedFoldersRecord != []) {
|
} // optionalAttrs (sharedFoldersRecord != []) {
|
||||||
shared_folders = sharedFoldersRecord;
|
shared_folders = sharedFoldersRecord;
|
||||||
}));
|
}));
|
||||||
|
Loading…
Reference in New Issue
Block a user