git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commitb9e0992e879667afc29104af5b9f95cd87a26d79 authorDaniël de Kok <me@danieldk.eu> dateMon 10 Jun 2019, 15:11 (7 years ago) parent704bd03
1 file changed+3−3
nixos/modules/services/networking/resilio.nix+3−3
nixos/modules/services/networking/resilio.nix+3−3
@@ -30,12 +30,12 @@ let
3030 download_limit = cfg.downloadLimit;
3131 upload_limit = cfg.uploadLimit;
3232 lan_encrypt_data = cfg.encryptLAN;
33− } // optionalAttrs cfg.enableWebUI {
33+ } // optionalAttrs (cfg.directoryRoot != "") { directory_root = cfg.directoryRoot; }
34+ // optionalAttrs cfg.enableWebUI {
3435 webui = { listen = "${cfg.httpListenAddr}:${toString cfg.httpListenPort}"; } //
3536 (optionalAttrs (cfg.httpLogin != "") { login = cfg.httpLogin; }) //
3637 (optionalAttrs (cfg.httpPass != "") { password = cfg.httpPass; }) //
37− (optionalAttrs (cfg.apiKey != "") { api_key = cfg.apiKey; }) //
38− (optionalAttrs (cfg.directoryRoot != "") { directory_root = cfg.directoryRoot; });
38+ (optionalAttrs (cfg.apiKey != "") { api_key = cfg.apiKey; });
3939 } // optionalAttrs (sharedFoldersRecord != []) {
4040 shared_folders = sharedFoldersRecord;
4141 }));