make the source of variable from environment

This commit is contained in:
王邈 2019-02-14 23:56:59 +08:00 committed by dramforever
parent 4a96316b6d
commit 660a774310

4
nix.py
View File

@ -11,8 +11,8 @@ from pathlib import Path
from urllib3.util.retry import Retry from urllib3.util.retry import Retry
UPSTREAM_URL = 'https://nixos.org/releases/nix' UPSTREAM_URL = os.getenv("TUNASYNC_UPSTREAM_URL", 'https://nixos.org/releases/nix/')
MIRROR_BASE_URL = 'https://mirrors.tuna.tsinghua.edu.cn/nix' MIRROR_BASE_URL = os.getenv("MIRROR_BASE_URL", 'https://mirrors.tuna.tsinghua.edu.cn/nix')
WORKING_DIR = os.getenv("TUNASYNC_WORKING_DIR", 'working') WORKING_DIR = os.getenv("TUNASYNC_WORKING_DIR", 'working')
CLONE_SINCE = datetime(2018, 6, 1) CLONE_SINCE = datetime(2018, 6, 1)
TIMEOUT = 60 TIMEOUT = 60