patches and low-level development discussion
 help / color / mirror / code / Atom feed
blob 105e09d695b1933f1cc1913271f589839f4426f2 2105 bytes (raw)
name: Documentation/doc/installation/binary-cache.adoc 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
 
= Setting Up Binary Cache
:page-nav_order: 1

// SPDX-FileCopyrightText: 2022-2024 Alyssa Ross <hi@alyssa.is>
// SPDX-License-Identifier: GFDL-1.3-no-invariants-or-later OR CC-BY-SA-4.0

Building Spectrum from source can take a very long time.  To avoid
having to wait when building the system to try it out or test patches,
an aarch64 and x86_64 binary cache service is available.  If
configured to do so, Nix will download build outputs from the cache,
instead of building them locally.

The binary cache is populated by doing a Spectrum
xref:../development/release.adoc[release build] with a
https://spectrum-os.org/git/infra/about[custom Linux image] on
https://www.scaleway.com/[Scaleway], and are signed to ensure
authenticity.  The build infrastructure and signing key are accessible
by Alyssa Ross.  Storage is provided by Daniel Kuehn.  Please
xref:../contributing/communication.adoc[get in touch] if you encounter
any trouble with it.

== For NixOS

Add the following configuration to /etc/nixos/configuration.nix:

[source,nix]
----
{ ... }:

{
  nix.settings.substituters = [ "https://cache.dataaturservice.se/spectrum/" ];
  nix.settings.trusted-public-keys = [
    "spectrum-os.org-2:foQk3r7t2VpRx92CaXb5ROyy/NBdRJQG2uX2XJMYZfU="
  ];
}
----

This configuration adds the Spectrum binary cache as a substituter and makes
Nix trust builds signed with its public key.

To apply changes, rebuild your system with the https://nixos.wiki/wiki/Nixos-rebuild[nixos-rebuild] command.


== For Non-NixOS Systems

Add the following configuration to /etc/nix/nix.conf:

[source]
----
extra-substituters = https://cache.dataaturservice.se/spectrum/
extra-trusted-public-keys = spectrum-os.org-2:foQk3r7t2VpRx92CaXb5ROyy/NBdRJQG2uX2XJMYZfU=
----

Run `systemctl restart nix-daemon.service` after making any changes in the Nix
configuration.  After that the binary cache will be used automatically when
`nix-build` is run.

If you have other binary caches configured besides cache.nixos.org,
make sure to add the Spectrum cache URL and public key to the existing
configuration lines in your nix.conf file.

debug log:

solving 105e09d ...
found 105e09d in https://spectrum-os.org/git/spectrum

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).