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;
|
||||
upload_limit = cfg.uploadLimit;
|
||||
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}"; } //
|
||||
(optionalAttrs (cfg.httpLogin != "") { login = cfg.httpLogin; }) //
|
||||
(optionalAttrs (cfg.httpPass != "") { password = cfg.httpPass; }) //
|
||||
(optionalAttrs (cfg.apiKey != "") { api_key = cfg.apiKey; }) //
|
||||
(optionalAttrs (cfg.directoryRoot != "") { directory_root = cfg.directoryRoot; });
|
||||
(optionalAttrs (cfg.apiKey != "") { api_key = cfg.apiKey; });
|
||||
} // optionalAttrs (sharedFoldersRecord != []) {
|
||||
shared_folders = sharedFoldersRecord;
|
||||
}));
|
||||
|
|
Loading…
Reference in a new issue