From 660a774310dd7c2cbe1c7d21b917a6eb03824488 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E9=82=88?= Date: Thu, 14 Feb 2019 23:56:59 +0800 Subject: [PATCH] make the source of variable from environment --- nix.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix.py b/nix.py index f1fda38..1c8f3de 100755 --- a/nix.py +++ b/nix.py @@ -11,8 +11,8 @@ from pathlib import Path from urllib3.util.retry import Retry -UPSTREAM_URL = 'https://nixos.org/releases/nix' -MIRROR_BASE_URL = 'https://mirrors.tuna.tsinghua.edu.cn/nix' +UPSTREAM_URL = os.getenv("TUNASYNC_UPSTREAM_URL", 'https://nixos.org/releases/nix/') +MIRROR_BASE_URL = os.getenv("MIRROR_BASE_URL", 'https://mirrors.tuna.tsinghua.edu.cn/nix') WORKING_DIR = os.getenv("TUNASYNC_WORKING_DIR", 'working') CLONE_SINCE = datetime(2018, 6, 1) TIMEOUT = 60