Merge pull request #85689 from danieldk/resilio-module-fix

nixos/resilio: fix directoryRoot configuration
This commit is contained in:
Daniël de Kok 2020-07-20 11:31:36 +02:00 committed by GitHub
commit d0c12dc612
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}));