├── .gitignore ├── alpine ├── test.sh └── Dockerfile ├── cargo ├── test.sh ├── config └── Dockerfile ├── dart ├── pubspec.yaml └── Dockerfile ├── flathub ├── test.sh └── Dockerfile ├── README.md ├── flutter ├── test.sh └── Dockerfile ├── run.sh ├── pypi ├── pip.conf ├── test.sh └── Dockerfile ├── debian ├── test.sh └── Dockerfile ├── ubuntu ├── test.sh └── Dockerfile ├── emacs-elpa ├── test.sh ├── Dockerfile └── .spacemacs ├── julia_with_conda ├── test.sh ├── Dockerfile └── .condarc ├── fedora-ostree ├── test.sh └── Dockerfile ├── anaconda ├── Dockerfile ├── test.sh └── .condarc ├── opam ├── test.sh └── Dockerfile ├── rustup ├── test.sh └── Dockerfile ├── opensuse └── Dockerfile ├── archlinux └── Dockerfile ├── centos └── Dockerfile ├── julia ├── Dockerfile ├── .condarc └── test.sh ├── guix ├── test.sh └── Dockerfile ├── fedora └── Dockerfile ├── .github └── workflows │ └── docker.yml ├── voidlinux └── Dockerfile ├── openwrt └── Dockerfile ├── mongodb ├── test.sh └── Dockerfile ├── nixos └── Dockerfile ├── intercept-https.md ├── Makefile ├── epel └── Dockerfile ├── rpmfusion └── Dockerfile ├── LICENSE └── docker-compose.yml /.gitignore: -------------------------------------------------------------------------------- 1 | certificate.pem 2 | certificate.crt 3 | -------------------------------------------------------------------------------- /alpine/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | apk add --update alpine-sdk 6 | -------------------------------------------------------------------------------- /cargo/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | cd raytracer.rs 6 | cargo check 7 | -------------------------------------------------------------------------------- /dart/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: my_app 2 | dependencies: 3 | js: ^0.6.0 4 | intl: ^0.15.8 5 | -------------------------------------------------------------------------------- /flathub/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | flatpak install flathub org.gimp.GIMP 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # mirrors-test-scripts 2 | 3 | A set of scripts to test if SJTUG mirror functions correctly. 4 | -------------------------------------------------------------------------------- /flutter/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | cd flutter 6 | git pull 7 | ./bin/flutter doctor 8 | -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | docker-compose build $1 && docker-compose run --rm $1 6 | 7 | -------------------------------------------------------------------------------- /pypi/pip.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | index-url = https://mirrors.sjtug.sjtu.edu.cn/pypi/web/simple 3 | format = columns 4 | -------------------------------------------------------------------------------- /pypi/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | pip install -U pip --upgrade 6 | pip install -U numpy tensorflow 7 | -------------------------------------------------------------------------------- /debian/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | apt-get update -y 6 | apt-get install -y wget git --download-only 7 | -------------------------------------------------------------------------------- /ubuntu/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | apt-get update -y 6 | apt-get install -y wget git --download-only 7 | -------------------------------------------------------------------------------- /emacs-elpa/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | emacs --batch -l ~/.emacs.d/init.el --eval="(configuration-layer/update-packages t)" 6 | -------------------------------------------------------------------------------- /julia_with_conda/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | julia -e 'using Pkg; Pkg.add("Conda")' 6 | julia -e 'using Conda; Conda.channels()' 7 | -------------------------------------------------------------------------------- /fedora-ostree/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | ostree remote refs fedora 6 | ostree pull fedora:fedora/rawhide/x86_64/silverblue --disable-fsync 7 | -------------------------------------------------------------------------------- /anaconda/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM conda/miniconda3:latest 2 | LABEL maintainer="iskyzh@gmail.com" 3 | 4 | COPY .condarc /root 5 | COPY test.sh /root 6 | 7 | CMD /root/test.sh 8 | -------------------------------------------------------------------------------- /cargo/config: -------------------------------------------------------------------------------- 1 | [source] 2 | 3 | [source.mirror] 4 | registry = "https://mirrors.sjtug.sjtu.edu.cn/git/crates.io-index/" 5 | 6 | [source.crates-io] 7 | replace-with = "mirror" 8 | -------------------------------------------------------------------------------- /opam/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | opam init default https://mirrors.sjtug.sjtu.edu.cn/git/opam-repository.git -a --disable-sandboxing --reinit 6 | opam install lwt -y 7 | -------------------------------------------------------------------------------- /rustup/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | curl https://sh.rustup.rs -sSf | sh -s -- -y 4 | source $HOME/.cargo/env 5 | rustup toolchain install stable 6 | rustup toolchain install nightly 7 | 8 | -------------------------------------------------------------------------------- /anaconda/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | conda update conda 5 | conda create -n tensorflow tensorflow 6 | conda create -c pytorch -n pytorch pytorch 7 | conda create -c conda-forge -n numpy conda-forge-numpy 8 | -------------------------------------------------------------------------------- /pypi/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.8 2 | LABEL maintainer="iskyzh@gmail.com" 3 | 4 | RUN pip config set global.index-url https://mirrors.sjtug.sjtu.edu.cn/pypi/web/simple 5 | COPY test.sh /root 6 | 7 | CMD /root/test.sh 8 | -------------------------------------------------------------------------------- /dart/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM google/dart 2 | LABEL maintainer="iskyzh@gmail.com" 3 | 4 | WORKDIR /app 5 | ENV PUB_HOSTED_URL=https://dart-pub.mirrors.sjtug.sjtu.edu.cn 6 | 7 | COPY ./pubspec.yaml /app 8 | 9 | CMD pub get 10 | -------------------------------------------------------------------------------- /opensuse/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM opensuse/leap 2 | LABEL maintainer="iskyzh@gmail.com" 3 | 4 | RUN sed -i 's|download.opensuse.org|mirror.sjtu.edu.cn/opensuse|g' /etc/zypp/repos.d/* 5 | 6 | CMD zypper update && zypper install -y nginx 7 | -------------------------------------------------------------------------------- /alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:latest 2 | 3 | RUN sed -i 's/http:\/\/dl-cdn.alpinelinux.org/http:\/\/mirrors.sjtug.sjtu.edu.cn/g' /etc/apk/repositories 4 | RUN cat /etc/apk/repositories 5 | COPY test.sh /root/test.sh 6 | CMD /root/test.sh 7 | -------------------------------------------------------------------------------- /archlinux/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM archlinux 2 | LABEL maintainer="iskyzh@gmail.com" 3 | 4 | RUN echo "Server = https://mirrors.sjtug.sjtu.edu.cn/archlinux/\$repo/os/\$arch" > /etc/pacman.d/mirrorlist 5 | 6 | CMD pacman -Syu --noconfirm flatpak 7 | -------------------------------------------------------------------------------- /centos/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM centos:latest 2 | 3 | RUN sed -e 's/mirrorlist/#mirrorlist/g' -e 's|#baseurl=http://mirror.centos.org/|baseurl=http://mirror.sjtu.edu.cn/|g' -i.bak /etc/yum.repos.d/* 4 | 5 | CMD dnf makecache && yum -y install vim 6 | -------------------------------------------------------------------------------- /julia/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM julia 2 | LABEL maintainer="iskyzh@gmail.com" 3 | 4 | ENV JULIA_PKG_SERVER=https://mirrors.sjtug.sjtu.edu.cn/julia/ 5 | RUN echo "versioninfo()" | julia 6 | COPY test.sh /root 7 | COPY .condarc /root 8 | 9 | CMD /root/test.sh 10 | -------------------------------------------------------------------------------- /guix/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | guix build sddm --substitute-urls='https://mirror.sjtu.edu.cn/guix' 5 | # guix weather --substitute-urls='https://mirror.sjtu.edu.cn/guix' 6 | # guix build gnucash --substitute-urls='https://mirror.sjtu.edu.cn/guix' 7 | 8 | -------------------------------------------------------------------------------- /julia_with_conda/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM julia 2 | LABEL maintainer="iskyzh@gmail.com" 3 | 4 | ENV JULIA_PKG_SERVER=https://mirrors.sjtug.sjtu.edu.cn/julia/ 5 | RUN echo "versioninfo()" | julia 6 | COPY test.sh /root 7 | COPY .condarc /root 8 | 9 | CMD /root/test.sh 10 | -------------------------------------------------------------------------------- /fedora/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM fedora:latest 2 | 3 | RUN rm /etc/yum.repos.d/fedora-cisco-openh264.repo 4 | 5 | RUN sed -e 's/metalink/#metalink/g' -e 's|#baseurl=http://download.example/pub/|baseurl=http://mirror.sjtu.edu.cn/|g' -i.bak /etc/yum.repos.d/* 6 | 7 | CMD dnf makecache && yum -y install vim 8 | -------------------------------------------------------------------------------- /guix/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM metacall/guix 2 | LABEL maintainer="iskyzh@gmail.com" 3 | 4 | WORKDIR /sjtug-test 5 | COPY test.sh /sjtug-test 6 | 7 | RUN sed -i "s|https://git.savannah.gnu.org/git/guix.git|https://git.sjtu.edu.cn/sjtug/guix.git|g" ~/.config/guix/channels.scm 8 | 9 | CMD /sjtug-test/test.sh 10 | -------------------------------------------------------------------------------- /debian/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:buster 2 | 3 | RUN sed -i 's/http:\/\/deb.debian.org/http:\/\/siyuan.internal.sjtug.org/g' /etc/apt/sources.list 4 | RUN sed -i 's/http:\/\/security.debian.org/http:\/\/siyuan.internal.sjtug.org/g' /etc/apt/sources.list 5 | 6 | RUN cat /etc/apt/sources.list 7 | COPY test.sh /root 8 | 9 | CMD /root/test.sh 10 | -------------------------------------------------------------------------------- /.github/workflows/docker.yml: -------------------------------------------------------------------------------- 1 | name: Docker Compose 2 | on: 3 | push: 4 | branches: 5 | - master 6 | pull_request: 7 | branches: 8 | - master 9 | jobs: 10 | test: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v2 14 | - name: docker-compose build 15 | run: docker-compose build 16 | -------------------------------------------------------------------------------- /voidlinux/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM voidlinux/voidlinux 2 | LABEL maintainer="iskyzh@gmail.com" 3 | 4 | RUN mkdir -p /etc/xbps.d 5 | RUN cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/ 6 | RUN sed -i 's|https://alpha.de.repo.voidlinux.org|https://mirror.sjtu.edu.cn/voidlinux|g' /etc/xbps.d/*-repository-*.conf 7 | 8 | CMD xbps-query -L && xbps-install -Syu firefox 9 | -------------------------------------------------------------------------------- /cargo/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM rust 2 | LABEL maintainer="iskyzh@gmail.com" 3 | 4 | COPY config /.cargo/ 5 | COPY test.sh /root 6 | RUN git clone https://github.com/skyzh/raytracer.rs 7 | ENV RUSTUP_DIST_SERVER=https://mirrors.sjtug.sjtu.edu.cn/rust-static 8 | ENV RUSTUP_UPDATE_ROOT=https://mirrors.sjtug.sjtu.edu.cn/rust-static/rustup 9 | 10 | CMD /root/test.sh 11 | -------------------------------------------------------------------------------- /julia/.condarc: -------------------------------------------------------------------------------- 1 | default_channels: 2 | - https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/r 3 | - https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/main 4 | custom_channels: 5 | conda-forge: https://anaconda.mirrors.sjtug.sjtu.edu.cn/cloud/ 6 | pytorch: https://anaconda.mirrors.sjtug.sjtu.edu.cn/cloud/ 7 | channels: 8 | - defaults 9 | how_channel_urls: true 10 | -------------------------------------------------------------------------------- /opam/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM archlinux:latest 2 | LABEL maintainer="iskyzh@gmail.com" 3 | 4 | ARG USE_SJTUG 5 | RUN if [ "$USE_SJTUG" = "true" ] ; then echo "Server = https://mirrors.sjtug.sjtu.edu.cn/archlinux/\$repo/os/\$arch" > /etc/pacman.d/mirrorlist ; fi 6 | 7 | RUN pacman -Syy --noconfirm opam git base-devel 8 | COPY test.sh /root 9 | 10 | CMD /root/test.sh 11 | -------------------------------------------------------------------------------- /anaconda/.condarc: -------------------------------------------------------------------------------- 1 | default_channels: 2 | - https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/r 3 | - https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/main 4 | custom_channels: 5 | conda-forge: https://anaconda.mirrors.sjtug.sjtu.edu.cn/cloud/ 6 | pytorch: https://anaconda.mirrors.sjtug.sjtu.edu.cn/cloud/ 7 | channels: 8 | - defaults 9 | show_channel_urls: true 10 | -------------------------------------------------------------------------------- /openwrt/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM openwrtorg/rootfs:x86_64-19.07.4 2 | 3 | RUN sed -i 's|http://downloads.openwrt.org|http://mirrors.internal.skyzh.xyz/openwrt|g' /etc/opkg/distfeeds.conf 4 | RUN mkdir /var/lock 5 | 6 | CMD opkg update && opkg install shadowsocks-libev-ss-local shadowsocks-libev-ss-redir shadowsocks-libev-ss-rules shadowsocks-libev-ss-tunnel luci-app-shadowsocks-libev 7 | -------------------------------------------------------------------------------- /mongodb/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | apt-key add - 6 | echo "deb [ arch=amd64,arm64 ] https://mirrors.sjtug.sjtu.edu.cn/mongodb/apt/ubuntu/ focal/mongodb-org/4.4 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.4.list 7 | apt-get update -y -qq 8 | apt-get install -y mongodb-org --download-only 9 | -------------------------------------------------------------------------------- /julia_with_conda/.condarc: -------------------------------------------------------------------------------- 1 | default_channels: 2 | - https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/r 3 | - https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/main 4 | custom_channels: 5 | conda-forge: https://anaconda.mirrors.sjtug.sjtu.edu.cn/cloud/ 6 | pytorch: https://anaconda.mirrors.sjtug.sjtu.edu.cn/cloud/ 7 | channels: 8 | - defaults 9 | how_channel_urls: true 10 | -------------------------------------------------------------------------------- /ubuntu/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:20.04 2 | LABEL maintainer="iskyzh@gmail.com" 3 | 4 | RUN sed -i 's/http:\/\/archive.ubuntu.com/http:\/\/mirror.sjtu.edu.cn/g' /etc/apt/sources.list 5 | RUN sed -i 's/http:\/\/security.ubuntu.com/http:\/\/mirror.sjtu.edu.cn/g' /etc/apt/sources.list 6 | 7 | 8 | RUN cat /etc/apt/sources.list 9 | COPY test.sh /root 10 | 11 | CMD /root/test.sh 12 | -------------------------------------------------------------------------------- /nixos/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nixos/nix 2 | 3 | ARG USE_SJTUG 4 | RUN if [ "$USE_SJTUG" = "true" ] ; then nix-channel --add https://mirrors.tuna.tsinghua.edu.cn/nix-channels/nixpkgs-unstable nixpkgs ; else nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs ; fi 5 | RUN nix-channel --update 6 | 7 | CMD nix-env -i vim -i python3 --substituters https://mirror.sjtu.sjtu.edu.cn/nix-channels/store 8 | -------------------------------------------------------------------------------- /intercept-https.md: -------------------------------------------------------------------------------- 1 | ```Dockerfile 2 | RUN apt-get update -y -qq && apt-get install ca-certificates -y -qq 3 | COPY certificate.crt /usr/local/share/ca-certificates/ 4 | RUN update-ca-certificates 5 | 6 | ENV http_proxy=http://host.docker.internal:1089 7 | ENV HTTP_PROXY=http://host.docker.internal:1089 8 | ENV https_proxy=http://host.docker.internal:1089 9 | ENV HTTPS_PROXY=http://host.docker.internal:1089 10 | ``` 11 | -------------------------------------------------------------------------------- /rustup/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM archlinux:latest 2 | LABEL maintainer="iskyzh@gmail.com" 3 | 4 | ARG USE_SJTUG 5 | RUN if [ "$USE_SJTUG" = "true" ] ; then echo "Server = https://mirrors.sjtug.sjtu.edu.cn/archlinux/\$repo/os/\$arch" > /etc/pacman.d/mirrorlist ; fi 6 | 7 | RUN pacman -Syy --noconfirm curl 8 | ENV RUSTUP_DIST_SERVER=https://mirrors.sjtug.sjtu.edu.cn/rust-static 9 | ENV RUSTUP_UPDATE_ROOT=https://mirrors.sjtug.sjtu.edu.cn/rust-static/rustup 10 | 11 | COPY test.sh /root 12 | CMD /root/test.sh 13 | -------------------------------------------------------------------------------- /julia/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | julia -e 'using Pkg; pkg"add Images DifferentialEquations Plots Flux JuMP Makie"' 6 | julia -e 'using Pkg; Pkg.add("Images")' 7 | julia -e 'using Pkg; Pkg.add("Plots")' 8 | julia -e 'using Pkg; Pkg.add("FFMPEG")' 9 | julia -e 'using Pkg; Pkg.add("Makie")' 10 | julia -e 'using Pkg; Pkg.add("DifferentialEquations")' 11 | julia -e 'using Pkg; Pkg.add("Turing")' 12 | julia -e 'using Pkg; Pkg.add("Flux")' 13 | julia -e 'using Pkg; Pkg.add("IJulia")' 14 | julia -e 'using Pkg; Pkg.add("Conda")' 15 | -------------------------------------------------------------------------------- /flathub/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM archlinux:latest 2 | LABEL maintainer="iskyzh@gmail.com" 3 | 4 | ARG USE_SJTUG 5 | RUN if [ "$USE_SJTUG" = "true" ] ; then echo "Server = https://mirrors.sjtug.sjtu.edu.cn/archlinux/\$repo/os/\$arch" > /etc/pacman.d/mirrorlist ; fi 6 | 7 | RUN pacman -Syy --noconfirm flatpak 8 | RUN flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo 9 | RUN flatpak remote-modify flathub --url=https://mirror.sjtu.edu.cn/flathub 10 | ENV FLATPAK_GL_DRIVERS=dummy 11 | 12 | COPY test.sh /root 13 | CMD /root/test.sh 14 | -------------------------------------------------------------------------------- /mongodb/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:20.04 2 | LABEL maintainer="iskyzh@gmail.com" 3 | 4 | ARG USE_SJTUG 5 | RUN if [ "$USE_SJTUG" = "true" ] ; then sed -i 's/http:\/\/archive.ubuntu.com/http:\/\/mirrors.sjtug.sjtu.edu.cn/g' /etc/apt/sources.list ; fi 6 | 7 | RUN apt-get update -qq && apt-get install ca-certificates gnupg wget -y -qq 8 | RUN sed -i 's/http:\/\/security.ubuntu.com/https:\/\/mirrors.sjtug.sjtu.edu.cn/g' /etc/apt/sources.list && sed -i 's/http:\/\/archive.ubuntu.com/https:\/\/mirrors.sjtug.sjtu.edu.cn/g' /etc/apt/sources.list 9 | COPY test.sh /root 10 | 11 | CMD /root/test.sh 12 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | test: test-opam test-pypi test-cargo test-anaconda test-julia test-mongodb 2 | 3 | build-all: 4 | docker-compose build --build-arg USE_SJTUG=true 5 | 6 | test-docker: 7 | docker image rm docker.mirrors.sjtug.sjtu.edu.cn/library/fedora || true 8 | docker pull docker.mirrors.sjtug.sjtu.edu.cn/library/fedora:latest 9 | 10 | test-gcr-io: 11 | docker image rm k8s-gcr-io.mirrors.sjtug.sjtu.edu.cn/echoserver:1.4 || true 12 | docker pull k8s-gcr-io.mirrors.sjtug.sjtu.edu.cn/echoserver:1.4 13 | 14 | build-%: 15 | docker-compose build --build-arg USE_SJTUG=true $* 16 | 17 | test-%: build-% 18 | docker-compose run --rm $* 19 | -------------------------------------------------------------------------------- /epel/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM centos:latest 2 | 3 | ARG USE_SJTUG 4 | 5 | RUN if [ "$USE_SJTUG" = "true" ] ; then echo "NOTICE: You're bootstrapping with SJTUG mirror" ; fi 6 | RUN if [ "$USE_SJTUG" = "true" ] ; then sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/* ; fi 7 | RUN if [ "$USE_SJTUG" = "true" ] ; then sed -i 's|#baseurl=http://mirror.centos.org/|baseurl=http://mirrors.sjtug.sjtu.edu.cn/|g' /etc/yum.repos.d/* ; fi 8 | 9 | RUN dnf makecache && yum install -y epel-release 10 | 11 | RUN sed -i 's/metalink/#metalink/g' /etc/yum.repos.d/epel* 12 | RUN sed -i 's|#baseurl=https://download.fedoraproject.org/pub/|baseurl=http://mirrors.internal.skyzh.xyz/fedora/|g' /etc/yum.repos.d/epel* 13 | 14 | CMD yum update -y && yum install -y chromium 15 | -------------------------------------------------------------------------------- /fedora-ostree/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:buster 2 | LABEL maintainer="iskyzh@gmail.com" 3 | 4 | ARG USE_SJTUG 5 | 6 | RUN if [ "$USE_SJTUG" = "true" ] ; then sed -i 's/http:\/\/deb.debian.org/http:\/\/mirrors.sjtug.sjtu.edu.cn/g' /etc/apt/sources.list ; fi 7 | RUN if [ "$USE_SJTUG" = "true" ] ; then sed -i 's/http:\/\/security.debian.org/http:\/\/ftp.sjtu.edu.cn/g' /etc/apt/sources.list ; fi 8 | 9 | RUN cat /etc/apt/sources.list 10 | RUN apt-get update -y -qq && apt-get install ostree ca-certificates -y -qq 11 | 12 | WORKDIR /ostree-repo 13 | 14 | RUN ostree init --repo=/ostree-repo --mode=bare-user 15 | RUN ostree remote add --repo=/ostree-repo --no-gpg-verify fedora https://mirror.sjtu.edu.cn/fedora-ostree 16 | 17 | COPY test.sh /root 18 | CMD /root/test.sh 19 | -------------------------------------------------------------------------------- /emacs-elpa/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM silex/emacs:latest 2 | LABEL maintainer="iskyzh@gmail.com" 3 | 4 | ARG USE_SJTUG 5 | RUN if [ "$USE_SJTUG" = "true" ] ; then echo "NOTICE: You're bootstrapping with SJTUG mirror" ; fi 6 | RUN if [ "$USE_SJTUG" = "true" ] ; then sed -i 's/http:\/\/archive.ubuntu.com/http:\/\/mirrors.sjtug.sjtu.edu.cn/g' /etc/apt/sources.list ; fi 7 | RUN if [ "$USE_SJTUG" = "true" ] ; then sed -i 's/http:\/\/security.ubuntu.com/http:\/\/mirrors.sjtug.sjtu.edu.cn/g' /etc/apt/sources.list ; fi 8 | 9 | RUN apt-get update -y && apt-get install git -y 10 | RUN rm -rf ~/.emacs.d 11 | RUN if [ "$USE_SJTUG" = "true" ] ; then \ 12 | git clone https://git.sjtu.edu.cn/sjtug/spacemacs.git ~/.emacs.d ; \ 13 | else \ 14 | git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d ; \ 15 | fi 16 | 17 | COPY test.sh /root 18 | COPY .spacemacs /root 19 | CMD /root/test.sh 20 | -------------------------------------------------------------------------------- /rpmfusion/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM fedora:latest 2 | 3 | RUN rm /etc/yum.repos.d/fedora-cisco-openh264.repo 4 | ARG USE_SJTUG 5 | 6 | RUN if [ "$USE_SJTUG" = "true" ] ; then echo "NOTICE: You're bootstrapping with SJTUG mirror" ; fi 7 | RUN if [ "$USE_SJTUG" = "true" ] ; then sed -i 's/metalink/#metalink/g' /etc/yum.repos.d/* ; fi 8 | RUN if [ "$USE_SJTUG" = "true" ] ; then sed -i 's|#baseurl=http://download.example/pub/|baseurl=http://mirrors.sjtug.sjtu.edu.cn/|g' /etc/yum.repos.d/* ; fi 9 | 10 | RUN dnf makecache && sh -c 'sudo yum install -y --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm' 11 | RUN sed -i 's/metalink/#metalink/g' /etc/yum.repos.d/rpmfusion-* 12 | RUN sed -i 's|#baseurl=http://download1.rpmfusion.org/|baseurl=http://mirrors.internal.skyzh.xyz/rpmfusion/|g' /etc/yum.repos.d/rpmfusion-* 13 | 14 | CMD yum install -y ffmpeg 15 | -------------------------------------------------------------------------------- /flutter/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:buster 2 | 3 | ARG USE_SJTUG 4 | 5 | WORKDIR /app 6 | 7 | RUN if [ "$USE_SJTUG" = "true" ] ; then echo "NOTICE: You're bootstrapping with SJTUG mirror" ; fi 8 | RUN if [ "$USE_SJTUG" = "true" ] ; then sed -i 's/http:\/\/deb.debian.org/http:\/\/siyuan.internal.sjtug.org/g' /etc/apt/sources.list ; fi 9 | RUN if [ "$USE_SJTUG" = "true" ] ; then sed -i 's/http:\/\/security.debian.org/http:\/\/siyuan.internal.sjtug.org/g' /etc/apt/sources.list ; fi 10 | 11 | RUN apt-get update -y && apt-get install -y curl git unzip 12 | 13 | ENV PUB_HOSTED_URL=https://mirrors.sjtug.sjtu.edu.cn/dart-pub 14 | ENV FLUTTER_STORAGE_BASE_URL=https://mirrors.sjtug.sjtu.edu.cn 15 | 16 | RUN if [ "$USE_SJTUG" = "true" ] ; then \ 17 | git clone -b stable --depth=1 https://git.sjtu.edu.cn/sjtug/flutter-sdk.git flutter ; \ 18 | else \ 19 | git clone -b stable --depth=1 https://github.com/flutter/flutter flutter ; \ 20 | fi 21 | 22 | COPY test.sh /app 23 | CMD /app/test.sh 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Alex Chi 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "2.3" 2 | services: 3 | anaconda: 4 | build: ./anaconda 5 | image: sjtug/anaconda-test:1.0 6 | cargo: 7 | build: ./cargo 8 | image: sjtug/cargo-test:1.0 9 | mongodb: 10 | build: ./mongodb 11 | image: sjtug/mongodb-test:1.0 12 | ubuntu: 13 | build: ./ubuntu 14 | image: sjtug/ubuntu-test:1.0 15 | julia: 16 | build: ./julia 17 | image: sjtug/julia-test:1.0 18 | flathub: 19 | build: ./flathub 20 | image: sjtug/flathub-test:1.0 21 | archlinux: 22 | build: ./archlinux 23 | image: sjtug/archlinux-test:1.0 24 | julia_with_conda: 25 | build: ./julia_with_conda 26 | image: sjtug/julia-conda-test:1.0 27 | rustup: 28 | build: ./rustup 29 | image: sjtug/rustup-test:1.0 30 | emacs-elpa: 31 | build: ./emacs-elpa 32 | image: sjtug/emacs-elpa-test:1.0 33 | alpine: 34 | build: ./alpine 35 | image: sjtug/alpine-test:1.0 36 | opam: 37 | build: ./opam 38 | image: sjtug/opam-test:1.0 39 | pypi: 40 | build: ./pypi 41 | image: sjtug/pypi-test:1.0 42 | dart: 43 | build: ./dart 44 | image: sjtug/dart-test:1.0 45 | fedora: 46 | build: ./fedora 47 | image: sjtug/fedora-test:1.0 48 | centos: 49 | build: ./centos 50 | image: sjtug/centos-test:1.0 51 | openwrt: 52 | build: ./openwrt 53 | image: sjtug/openwrt-test:1.0 54 | rpmfusion: 55 | build: ./rpmfusion 56 | image: sjtug/rpmfusion-test:1.0 57 | epel: 58 | build: ./epel 59 | image: sjtug/epel-test:1.0 60 | opensuse: 61 | build: ./opensuse 62 | image: sjtug/opensuse-test:1.0 63 | guix: 64 | build: ./guix 65 | image: sjtug/guix-test:1.0 66 | fedora-ostree: 67 | build: ./fedora-ostree 68 | image: sjtug/fedora-ostree-test:1.0 69 | pytorch: 70 | image: python:3.8 71 | command: pip install torch==1.7.1+cu101 torchvision==0.8.2+cu101 torchaudio==0.7.2 -f https://mirror.sjtu.edu.cn/pytorch-wheels/torch_stable.html 72 | debian: 73 | build: ./debian 74 | image: sjtug/debian-test:1.0 75 | flutter: 76 | build: ./flutter 77 | image: sjtug/flutter-test:1.0 78 | nixos: 79 | build: ./nixos 80 | image: sjtug/nixos-test:1.0 81 | voidlinux: 82 | build: ./voidlinux 83 | image: sjtug/voidlinux-test:1.0 84 | -------------------------------------------------------------------------------- /emacs-elpa/.spacemacs: -------------------------------------------------------------------------------- 1 | ;; -*- mode: emacs-lisp -*- 2 | ;; This file is loaded by Spacemacs at startup. 3 | ;; It must be stored in your home directory. 4 | 5 | (defun dotspacemacs/layers () 6 | "Configuration Layers declaration. 7 | You should not put any user code in this function besides modifying the variable 8 | values." 9 | (setq-default 10 | ;; Base distribution to use. This is a layer contained in the directory 11 | ;; `+distribution'. For now available distributions are `spacemacs-base' 12 | ;; or `spacemacs'. (default 'spacemacs) 13 | dotspacemacs-distribution 'spacemacs 14 | ;; Lazy installation of layers (i.e. layers are installed only when a file 15 | ;; with a supported type is opened). Possible values are `all', `unused' 16 | ;; and `nil'. `unused' will lazy install only unused layers (i.e. layers 17 | ;; not listed in variable `dotspacemacs-configuration-layers'), `all' will 18 | ;; lazy install any layer that support lazy installation even the layers 19 | ;; listed in `dotspacemacs-configuration-layers'. `nil' disable the lazy 20 | ;; installation feature and you have to explicitly list a layer in the 21 | ;; variable `dotspacemacs-configuration-layers' to install it. 22 | ;; (default 'unused) 23 | dotspacemacs-enable-lazy-installation 'unused 24 | ;; If non-nil then Spacemacs will ask for confirmation before installing 25 | ;; a layer lazily. (default t) 26 | dotspacemacs-ask-for-lazy-installation t 27 | ;; If non-nil layers with lazy install support are lazy installed. 28 | ;; List of additional paths where to look for configuration layers. 29 | ;; Paths must have a trailing slash (i.e. `~/.mycontribs/') 30 | dotspacemacs-configuration-layer-path '() 31 | ;; List of configuration layers to load. 32 | dotspacemacs-configuration-layers 33 | '( 34 | ;; ---------------------------------------------------------------- 35 | ;; Example of useful layers you may want to use right away. 36 | ;; Uncomment some layer names and press (Vim style) or 37 | ;; (Emacs style) to install them. 38 | ;; ---------------------------------------------------------------- 39 | helm 40 | ;; auto-completion 41 | ;; better-defaults 42 | emacs-lisp 43 | ;; git 44 | ;; markdown 45 | ;; org 46 | ;; (shell :variables 47 | ;; shell-default-height 30 48 | ;; shell-default-position 'bottom) 49 | ;; spell-checking 50 | ;; syntax-checking 51 | ;; version-control 52 | ) 53 | ;; List of additional packages that will be installed without being 54 | ;; wrapped in a layer. If you need some configuration for these 55 | ;; packages, then consider creating a layer. You can also put the 56 | ;; configuration in `dotspacemacs/user-config'. 57 | dotspacemacs-additional-packages '() 58 | ;; A list of packages that cannot be updated. 59 | dotspacemacs-frozen-packages '() 60 | ;; A list of packages that will not be installed and loaded. 61 | dotspacemacs-excluded-packages '() 62 | ;; Defines the behaviour of Spacemacs when installing packages. 63 | ;; Possible values are `used-only', `used-but-keep-unused' and `all'. 64 | ;; `used-only' installs only explicitly used packages and uninstall any 65 | ;; unused packages as well as their unused dependencies. 66 | ;; `used-but-keep-unused' installs only the used packages but won't uninstall 67 | ;; them if they become unused. `all' installs *all* packages supported by 68 | ;; Spacemacs and never uninstall them. (default is `used-only') 69 | dotspacemacs-install-packages 'used-only)) 70 | 71 | (defun dotspacemacs/init () 72 | "Initialization function. 73 | This function is called at the very startup of Spacemacs initialization 74 | before layers configuration. 75 | You should not put any user code in there besides modifying the variable 76 | values." 77 | ;; This setq-default sexp is an exhaustive list of all the supported 78 | ;; spacemacs settings. 79 | (setq-default 80 | ;; If non nil ELPA repositories are contacted via HTTPS whenever it's 81 | ;; possible. Set it to nil if you have no way to use HTTPS in your 82 | ;; environment, otherwise it is strongly recommended to let it set to t. 83 | ;; This variable has no effect if Emacs is launched with the parameter 84 | ;; `--insecure' which forces the value of this variable to nil. 85 | ;; (default t) 86 | dotspacemacs-elpa-https t 87 | ;; Maximum allowed time in seconds to contact an ELPA repository. 88 | dotspacemacs-elpa-timeout 5 89 | ;; If non nil then spacemacs will check for updates at startup 90 | ;; when the current branch is not `develop'. Note that checking for 91 | ;; new versions works via git commands, thus it calls GitHub services 92 | ;; whenever you start Emacs. (default nil) 93 | dotspacemacs-check-for-update nil 94 | ;; If non-nil, a form that evaluates to a package directory. For example, to 95 | ;; use different package directories for different Emacs versions, set this 96 | ;; to `emacs-version'. 97 | dotspacemacs-elpa-subdirectory nil 98 | ;; One of `vim', `emacs' or `hybrid'. 99 | ;; `hybrid' is like `vim' except that `insert state' is replaced by the 100 | ;; `hybrid state' with `emacs' key bindings. The value can also be a list 101 | ;; with `:variables' keyword (similar to layers). Check the editing styles 102 | ;; section of the documentation for details on available variables. 103 | ;; (default 'vim) 104 | dotspacemacs-editing-style 'vim 105 | ;; If non nil output loading progress in `*Messages*' buffer. (default nil) 106 | dotspacemacs-verbose-loading nil 107 | ;; Specify the startup banner. Default value is `official', it displays 108 | ;; the official spacemacs logo. An integer value is the index of text 109 | ;; banner, `random' chooses a random text banner in `core/banners' 110 | ;; directory. A string value must be a path to an image format supported 111 | ;; by your Emacs build. 112 | ;; If the value is nil then no banner is displayed. (default 'official) 113 | dotspacemacs-startup-banner 'official 114 | ;; List of items to show in startup buffer or an association list of 115 | ;; the form `(list-type . list-size)`. If nil then it is disabled. 116 | ;; Possible values for list-type are: 117 | ;; `recents' `bookmarks' `projects' `agenda' `todos'." 118 | ;; List sizes may be nil, in which case 119 | ;; `spacemacs-buffer-startup-lists-length' takes effect. 120 | dotspacemacs-startup-lists '((recents . 5) 121 | (projects . 7)) 122 | ;; True if the home buffer should respond to resize events. 123 | dotspacemacs-startup-buffer-responsive t 124 | ;; Default major mode of the scratch buffer (default `text-mode') 125 | dotspacemacs-scratch-mode 'text-mode 126 | ;; List of themes, the first of the list is loaded when spacemacs starts. 127 | ;; Press T n to cycle to the next theme in the list (works great 128 | ;; with 2 themes variants, one dark and one light) 129 | dotspacemacs-themes '(spacemacs-dark 130 | spacemacs-light) 131 | ;; If non nil the cursor color matches the state color in GUI Emacs. 132 | dotspacemacs-colorize-cursor-according-to-state t 133 | ;; Default font, or prioritized list of fonts. `powerline-scale' allows to 134 | ;; quickly tweak the mode-line size to make separators look not too crappy. 135 | dotspacemacs-default-font '("Source Code Pro" 136 | :size 13 137 | :weight normal 138 | :width normal 139 | :powerline-scale 1.1) 140 | ;; The leader key 141 | dotspacemacs-leader-key "SPC" 142 | ;; The key used for Emacs commands (M-x) (after pressing on the leader key). 143 | ;; (default "SPC") 144 | dotspacemacs-emacs-command-key "SPC" 145 | ;; The key used for Vim Ex commands (default ":") 146 | dotspacemacs-ex-command-key ":" 147 | ;; The leader key accessible in `emacs state' and `insert state' 148 | ;; (default "M-m") 149 | dotspacemacs-emacs-leader-key "M-m" 150 | ;; Major mode leader key is a shortcut key which is the equivalent of 151 | ;; pressing ` m`. Set it to `nil` to disable it. (default ",") 152 | dotspacemacs-major-mode-leader-key "," 153 | ;; Major mode leader key accessible in `emacs state' and `insert state'. 154 | ;; (default "C-M-m") 155 | dotspacemacs-major-mode-emacs-leader-key "C-M-m" 156 | ;; These variables control whether separate commands are bound in the GUI to 157 | ;; the key pairs C-i, TAB and C-m, RET. 158 | ;; Setting it to a non-nil value, allows for separate commands under 159 | ;; and TAB or and RET. 160 | ;; In the terminal, these pairs are generally indistinguishable, so this only 161 | ;; works in the GUI. (default nil) 162 | dotspacemacs-distinguish-gui-tab nil 163 | ;; If non nil `Y' is remapped to `y$' in Evil states. (default nil) 164 | dotspacemacs-remap-Y-to-y$ nil 165 | ;; If non-nil, the shift mappings `<' and `>' retain visual state if used 166 | ;; there. (default t) 167 | dotspacemacs-retain-visual-state-on-shift t 168 | ;; If non-nil, J and K move lines up and down when in visual mode. 169 | ;; (default nil) 170 | dotspacemacs-visual-line-move-text nil 171 | ;; If non nil, inverse the meaning of `g' in `:substitute' Evil ex-command. 172 | ;; (default nil) 173 | dotspacemacs-ex-substitute-global nil 174 | ;; Name of the default layout (default "Default") 175 | dotspacemacs-default-layout-name "Default" 176 | ;; If non nil the default layout name is displayed in the mode-line. 177 | ;; (default nil) 178 | dotspacemacs-display-default-layout nil 179 | ;; If non nil then the last auto saved layouts are resume automatically upon 180 | ;; start. (default nil) 181 | dotspacemacs-auto-resume-layouts nil 182 | ;; Size (in MB) above which spacemacs will prompt to open the large file 183 | ;; literally to avoid performance issues. Opening a file literally means that 184 | ;; no major mode or minor modes are active. (default is 1) 185 | dotspacemacs-large-file-size 1 186 | ;; Location where to auto-save files. Possible values are `original' to 187 | ;; auto-save the file in-place, `cache' to auto-save the file to another 188 | ;; file stored in the cache directory and `nil' to disable auto-saving. 189 | ;; (default 'cache) 190 | dotspacemacs-auto-save-file-location 'cache 191 | ;; Maximum number of rollback slots to keep in the cache. (default 5) 192 | dotspacemacs-max-rollback-slots 5 193 | ;; If non nil, `helm' will try to minimize the space it uses. (default nil) 194 | dotspacemacs-helm-resize nil 195 | ;; if non nil, the helm header is hidden when there is only one source. 196 | ;; (default nil) 197 | dotspacemacs-helm-no-header nil 198 | ;; define the position to display `helm', options are `bottom', `top', 199 | ;; `left', or `right'. (default 'bottom) 200 | dotspacemacs-helm-position 'bottom 201 | ;; Controls fuzzy matching in helm. If set to `always', force fuzzy matching 202 | ;; in all non-asynchronous sources. If set to `source', preserve individual 203 | ;; source settings. Else, disable fuzzy matching in all sources. 204 | ;; (default 'always) 205 | dotspacemacs-helm-use-fuzzy 'always 206 | ;; If non nil the paste micro-state is enabled. When enabled pressing `p` 207 | ;; several times cycle between the kill ring content. (default nil) 208 | dotspacemacs-enable-paste-transient-state nil 209 | ;; Which-key delay in seconds. The which-key buffer is the popup listing 210 | ;; the commands bound to the current keystroke sequence. (default 0.4) 211 | dotspacemacs-which-key-delay 0.4 212 | ;; Which-key frame position. Possible values are `right', `bottom' and 213 | ;; `right-then-bottom'. right-then-bottom tries to display the frame to the 214 | ;; right; if there is insufficient space it displays it at the bottom. 215 | ;; (default 'bottom) 216 | dotspacemacs-which-key-position 'bottom 217 | ;; If non nil a progress bar is displayed when spacemacs is loading. This 218 | ;; may increase the boot time on some systems and emacs builds, set it to 219 | ;; nil to boost the loading time. (default t) 220 | dotspacemacs-loading-progress-bar t 221 | ;; If non nil the frame is fullscreen when Emacs starts up. (default nil) 222 | ;; (Emacs 24.4+ only) 223 | dotspacemacs-fullscreen-at-startup nil 224 | ;; If non nil `spacemacs/toggle-fullscreen' will not use native fullscreen. 225 | ;; Use to disable fullscreen animations in OSX. (default nil) 226 | dotspacemacs-fullscreen-use-non-native nil 227 | ;; If non nil the frame is maximized when Emacs starts up. 228 | ;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil. 229 | ;; (default nil) (Emacs 24.4+ only) 230 | dotspacemacs-maximized-at-startup nil 231 | ;; A value from the range (0..100), in increasing opacity, which describes 232 | ;; the transparency level of a frame when it's active or selected. 233 | ;; Transparency can be toggled through `toggle-transparency'. (default 90) 234 | dotspacemacs-active-transparency 90 235 | ;; A value from the range (0..100), in increasing opacity, which describes 236 | ;; the transparency level of a frame when it's inactive or deselected. 237 | ;; Transparency can be toggled through `toggle-transparency'. (default 90) 238 | dotspacemacs-inactive-transparency 90 239 | ;; If non nil show the titles of transient states. (default t) 240 | dotspacemacs-show-transient-state-title t 241 | ;; If non nil show the color guide hint for transient state keys. (default t) 242 | dotspacemacs-show-transient-state-color-guide t 243 | ;; If non nil unicode symbols are displayed in the mode line. (default t) 244 | dotspacemacs-mode-line-unicode-symbols t 245 | ;; If non nil smooth scrolling (native-scrolling) is enabled. Smooth 246 | ;; scrolling overrides the default behavior of Emacs which recenters point 247 | ;; when it reaches the top or bottom of the screen. (default t) 248 | dotspacemacs-smooth-scrolling t 249 | ;; Control line numbers activation. 250 | ;; If set to `t' or `relative' line numbers are turned on in all `prog-mode' and 251 | ;; `text-mode' derivatives. If set to `relative', line numbers are relative. 252 | ;; This variable can also be set to a property list for finer control: 253 | ;; '(:relative nil 254 | ;; :disabled-for-modes dired-mode 255 | ;; doc-view-mode 256 | ;; markdown-mode 257 | ;; org-mode 258 | ;; pdf-view-mode 259 | ;; text-mode 260 | ;; :size-limit-kb 1000) 261 | ;; (default nil) 262 | dotspacemacs-line-numbers nil 263 | ;; Code folding method. Possible values are `evil' and `origami'. 264 | ;; (default 'evil) 265 | dotspacemacs-folding-method 'evil 266 | ;; If non-nil smartparens-strict-mode will be enabled in programming modes. 267 | ;; (default nil) 268 | dotspacemacs-smartparens-strict-mode nil 269 | ;; If non-nil pressing the closing parenthesis `)' key in insert mode passes 270 | ;; over any automatically added closing parenthesis, bracket, quote, etc… 271 | ;; This can be temporary disabled by pressing `C-q' before `)'. (default nil) 272 | dotspacemacs-smart-closing-parenthesis nil 273 | ;; Select a scope to highlight delimiters. Possible values are `any', 274 | ;; `current', `all' or `nil'. Default is `all' (highlight any scope and 275 | ;; emphasis the current one). (default 'all) 276 | dotspacemacs-highlight-delimiters 'all 277 | ;; If non nil, advise quit functions to keep server open when quitting. 278 | ;; (default nil) 279 | dotspacemacs-persistent-server nil 280 | ;; List of search tool executable names. Spacemacs uses the first installed 281 | ;; tool of the list. Supported tools are `ag', `pt', `ack' and `grep'. 282 | ;; (default '("ag" "pt" "ack" "grep")) 283 | dotspacemacs-search-tools '("ag" "pt" "ack" "grep") 284 | ;; The default package repository used if no explicit repository has been 285 | ;; specified with an installed package. 286 | ;; Not used for now. (default nil) 287 | dotspacemacs-default-package-repository nil 288 | ;; Delete whitespace while saving buffer. Possible values are `all' 289 | ;; to aggressively delete empty line and long sequences of whitespace, 290 | ;; `trailing' to delete only the whitespace at end of lines, `changed'to 291 | ;; delete only whitespace for changed lines or `nil' to disable cleanup. 292 | ;; (default nil) 293 | dotspacemacs-whitespace-cleanup nil 294 | )) 295 | 296 | (defun dotspacemacs/user-init () 297 | "Initialization function for user code. 298 | It is called immediately after `dotspacemacs/init', before layer configuration 299 | executes. 300 | This function is mostly useful for variables that need to be set 301 | before packages are loaded. If you are unsure, you should try in setting them in 302 | `dotspacemacs/user-config' first." 303 | (setq configuration-layer--elpa-archives 304 | '(("melpa-cn" . "https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/melpa/") 305 | ("org-cn" . "https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/org/") 306 | ("gnu-cn" . "https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/gnu/"))) 307 | ) 308 | 309 | (defun dotspacemacs/user-config () 310 | "Configuration function for user code. 311 | This function is called at the very end of Spacemacs initialization after 312 | layers configuration. 313 | This is the place where most of your configurations should be done. Unless it is 314 | explicitly specified that a variable should be set before a package is loaded, 315 | you should place your code here." 316 | ) 317 | 318 | ;; Do not write anything past this comment. This is where Emacs will 319 | ;; auto-generate custom variable definitions. 320 | --------------------------------------------------------------------------------