Add nix substituters and update nix.conf #34

Merged
sb10q merged 1 commits from fsagbuya/nix-servo:armv7l-cache into master 2024-02-20 15:41:19 +08:00
Collaborator

Description

Test log for the new substituter:

-bash-5.2# nix-shell -p hello
these 49 paths will be fetched (87.62 MiB download, 279.12 MiB unpacked):
  /nix/store/4b6afb7y2fydyz34cigkxrji97ghn1h8-acl-2.3.2
  /nix/store/5i5yc6yxf2vybyc2wmh8g358m73kipmc-attr-2.5.2
  /nix/store/swxxp2ymqc0c7zs841l9vnq01r28v060-bash-5.2p26
  /nix/store/ysxkhxmn5w8pdavakql38xyzq245kq3i-bash-interactive-5.2p26
  /nix/store/9y2wcnfsckmci4wrnvr5g97965qa8a8l-binutils-2.40
  
...

[nix-shell:/etc/nix]# hello
Hello, world!

Closes #27

### Description - Updated `nix.conf`, some settings we're [renamed](https://github.com/NixOS/nix/blob/60936f28e51bad1cf0a038ebfa24ce9bb97845a9/doc/manual/src/release-notes/rl-2.0.md?plain=1#L394-L398) for `nix 2.0+`: - build-max-jobs -> updated to `max-jobs` - build-cores -> updated to `cores` (value "0" is default and a [special value to use all CPU cores](https://github.com/NixOS/nixpkgs/blob/9ab019d53ad1dba59311e5e33fecef22d445df2d/nixos/modules/config/nix.nix#L205)) - build-use-sandbox -> updated to `sandbox` - build-sandbox-paths -> updated to `extra-sandbox-paths` - added [auto-optimise-store](https://github.com/NixOS/nixpkgs/blob/9ab019d53ad1dba59311e5e33fecef22d445df2d/nixos/modules/config/nix.nix#L191) - added [trusted-users](https://github.com/NixOS/nixpkgs/blob/9ab019d53ad1dba59311e5e33fecef22d445df2d/nixos/modules/config/nix.nix#L296C13-L296C26) - added `substituters` - NOTE: currently armv7l binary cache is not yet officially supported by NixOS, that's why `cache.nixos.org` is not working and will just build the packages natively. However, there is an [unofficial armv7l binary cache](https://hydra.armv7l.xyz/) that is supported by Nix users and is built in hydra, also documented here: https://nixos.wiki/wiki/NixOS_on_ARM#NixOS_installation_.26_configuration. Test log for the new substituter: ``` -bash-5.2# nix-shell -p hello these 49 paths will be fetched (87.62 MiB download, 279.12 MiB unpacked): /nix/store/4b6afb7y2fydyz34cigkxrji97ghn1h8-acl-2.3.2 /nix/store/5i5yc6yxf2vybyc2wmh8g358m73kipmc-attr-2.5.2 /nix/store/swxxp2ymqc0c7zs841l9vnq01r28v060-bash-5.2p26 /nix/store/ysxkhxmn5w8pdavakql38xyzq245kq3i-bash-interactive-5.2p26 /nix/store/9y2wcnfsckmci4wrnvr5g97965qa8a8l-binutils-2.40 ... [nix-shell:/etc/nix]# hello Hello, world! ``` Closes #27
fsagbuya added 1 commit 2024-02-20 14:33:58 +08:00
sb10q merged commit 1f3591a693 into master 2024-02-20 15:41:19 +08:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nix-servo#34
No description provided.