From d89454bb79d2495df903fc91d8c7a74ebdcc9cc3 Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Mon, 4 Jan 2016 04:00:18 -0600 Subject: [PATCH] nixos: btsync - add directoryRoot option Signed-off-by: Austin Seipp --- nixos/modules/services/networking/btsync.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/networking/btsync.nix b/nixos/modules/services/networking/btsync.nix index bd7a5bcebe6..fe462aeba9c 100644 --- a/nixos/modules/services/networking/btsync.nix +++ b/nixos/modules/services/networking/btsync.nix @@ -16,9 +16,10 @@ let '' "webui": { - ${optionalEmptyStr cfg.httpLogin "\"login\": \"${cfg.httpLogin}\","} - ${optionalEmptyStr cfg.httpPass "\"password\": \"${cfg.httpPass}\","} - ${optionalEmptyStr cfg.apiKey "\"api_key\": \"${cfg.apiKey}\","} + ${optionalEmptyStr cfg.httpLogin "\"login\": \"${cfg.httpLogin}\","} + ${optionalEmptyStr cfg.httpPass "\"password\": \"${cfg.httpPass}\","} + ${optionalEmptyStr cfg.apiKey "\"api_key\": \"${cfg.apiKey}\","} + ${optionalEmptyStr cfg.directoryRoot "\"directory_root\": \"${cfg.directoryRoot}\","} "listen": "${listenAddr}" } ''; @@ -221,6 +222,13 @@ in description = "API key, which enables the developer API."; }; + directoryRoot = mkOption { + type = types.str; + default = ""; + example = "/media"; + description = "Default directory to add folders in the web UI."; + }; + sharedFolders = mkOption { default = []; example =