Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议增加 NixOS 镜像 #165

Closed
OlingCat opened this issue Dec 14, 2017 · 19 comments
Closed

建议增加 NixOS 镜像 #165

OlingCat opened this issue Dec 14, 2017 · 19 comments

Comments

@OlingCat
Copy link

OlingCat commented Dec 14, 2017

上游源地址:

NixOS 的源需要用 nix 来同步,具体参见 https://nixos.org/nix-dev/2016-October/022029.html
例如,要添加 unstable channel 的源:

nix copy -r --store https://cache.nixos.community/ --to file:///tmp/my-mirror \
$(curl -L https://nixos.org/channels/nixos-unstable/store-paths.xz | xz -d)

项目简介

NixOS 是一个函数式发行版,它使用 nix 包管理器,通过声明式的配置文件来安装和更新,并可回滚至任意版本。nix 旨在彻底解决不同软件版本间的依赖问题,亦可多版本共存。

希望添加该镜像的原因

因为不明原因干扰,NixOS 的官方源在国内访问十分缓慢,希望 USTC 可以添加镜像用以加速。

NixOS 更改源参考

http://nix-cookbook.readthedocs.io/en/latest/faq.html#how-do-i-add-a-new-binary-cache

@zhsj
Copy link
Contributor

zhsj commented Dec 14, 2017

nix copy 可以处理增量同步吗?

如果上游可以给直接同步 s3 bucket 的权限,我们就可以用 rclone 同步了。

@zhsj zhsj added the new label Dec 14, 2017
@OlingCat
Copy link
Author

这个不清楚呃.. 乃来 NixOS/nixpkgs#32659 这里问下 @edolstra 好了= =

@OlingCat
Copy link
Author

NixOS/nixpkgs#32659 里建议改为 https://cache.nixos.community/

@zhsj
Copy link
Contributor

zhsj commented Dec 20, 2017

Basically, we hope upstream can provide a easy way to sync, e.g.

  • rsync
  • if upstream uses some cloud storage that rclone supports, please provide the credential like s3 access key and secret key(for read-only list).

otherwise, someone needs to devote his time to develop a custom sync tool which is easy to maintain and robust. But currently we lack a programmer

@ZeroAurora
Copy link

Channel

The usual way to obtain Nixpkgs is to subscribe to the Nixpkgs channel, which always contains the latest version of Nixpkgs:

$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable
$ nix-channel --update

After this, you can use nix-env to install available packages.

From: https://nixos.org/nixpkgs/download.html

这里只需要将 https://nixos.org/channels/nixpkgs-unstable 加入 nix-channel,是否就意味着只要同步 https://nixos.org/channels/nixpkgs-unstable 即可?

@ZeroAurora
Copy link

@zhsj 能否通过镜像https://nixos.org/channels/nixpkgs-unstable 或者构建 nixpkgs 仓库来达到目的?
看了一下,这仓库里的文件只有5个,跟之前许多文件的说法搭不上边,但它确实是 Nix 软件包仓库。(可能是因为 Nix 本身的改动)
(某 tuna 那里也没动静了。 。NixOS这么冷门的吗。。

@zhsj
Copy link
Contributor

zhsj commented Apr 21, 2018

@ZeroAurora 我不使用 nix,我无法验证你说的方法对不对。

如果你可以给出具体的方法,并可以验证可行,那我们就可以镜像。如果没有人提供 具体可行 的方法,那这个请求不会有任何进展。

@zhsj
Copy link
Contributor

zhsj commented Apr 21, 2018

如果有人找到镜像的方法,欢迎在 https://github.com/ustclug/ustcmirror-images 提供 PR。

@shankerwangmiao
Copy link

所以你们这面情况如何了?我们这边貌似仍然没任何进展。

@yuchangyuan
Copy link

这个链接上面的方法有人尝试过吗:

https://nixos.org/nix-dev/2016-October/022029.html

@yuchangyuan
Copy link

yuchangyuan commented Jan 11, 2020

最近试了下,大概下载了80G的内容。其中narinfo有45K个,nar有45K个。用的使用19.09的channel。

具体见: http://www.shlug.org/discuss/2020/01/11/nixos_mirror.html

@dramforever
Copy link

Draft of a syncing script: tuna/tunasync-scripts#49

@yuchangyuan
Copy link

写了一个原型脚本,有条件的同学是否能测试一下。我自己在家测试功能应该是没有问题的。

https://github.com/shanghailug/nix_mirror

@yuchangyuan
Copy link

@dramforever 同学已经新增了NixOS同步需要的docker image(ustclug/ustcmirror-images#57),但 http://mirrors.ustc.edu.cn/ 上并没有新增NixOS的镜像,新增镜像还需要什么工作吗?

@taoky
Copy link
Member

taoky commented Nov 14, 2020

https://mirrors.ustc.edu.cn/nix-channels/

欢迎测试与贡献帮助(https://github.com/ustclug/mirrorhelp

:-)

@taoky taoky closed this as completed Nov 14, 2020
@dramforever
Copy link

建议不允许列出 store 目录和 store/nar 目录内容,很长……

@taoky
Copy link
Member

taoky commented Nov 15, 2020

建议不允许列出 store 目录和 store/nar 目录内容,很长……

现在设置了 autoindex off,访问 storestore/nar 会返回 403.

@Freed-Wu
Copy link

Freed-Wu commented Mar 3, 2024

Is it possible to add mirror for nixpkgs.git?

#385

@taoky
Copy link
Member

taoky commented Mar 3, 2024

Is it possible to add mirror for nixpkgs.git?

Please create a new issue about this git repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants